mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Fix up ember-cli generated files and misc jscs/jshint errors
This commit is contained in:
parent
184da01702
commit
e492c43067
5 changed files with 60 additions and 57 deletions
|
@ -116,7 +116,8 @@ var _ = require('lodash'),
|
||||||
'!core/client/bower_components/**/*.js',
|
'!core/client/bower_components/**/*.js',
|
||||||
'!core/client/tmp/**/*.js',
|
'!core/client/tmp/**/*.js',
|
||||||
'!core/client/dist/**/*.js',
|
'!core/client/dist/**/*.js',
|
||||||
'!core/client/vendor/**/*.js'
|
'!core/client/vendor/**/*.js',
|
||||||
|
'!core/client/app/docs/**/*.js'
|
||||||
],
|
],
|
||||||
|
|
||||||
server: [
|
server: [
|
||||||
|
@ -148,7 +149,8 @@ var _ = require('lodash'),
|
||||||
'!core/client/bower_components/**/*.js',
|
'!core/client/bower_components/**/*.js',
|
||||||
'!core/client/tmp/**/*.js',
|
'!core/client/tmp/**/*.js',
|
||||||
'!core/client/dist/**/*.js',
|
'!core/client/dist/**/*.js',
|
||||||
'!core/client/vendor/**/*.js'
|
'!core/client/vendor/**/*.js',
|
||||||
|
'!core/client/app/docs/**/*.js'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
/* global require, module */
|
/* global require, module */
|
||||||
|
|
||||||
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
var EmberApp = require('ember-cli/lib/broccoli/ember-app'),
|
||||||
|
|
||||||
var app = new EmberApp(
|
app = new EmberApp({
|
||||||
{
|
hinting: false,
|
||||||
sourcemaps: {enabled: false} //see https://github.com/ember-cli/ember-cli/issues/2912
|
sourcemaps: {enabled: false} // see https://github.com/ember-cli/ember-cli/issues/2912
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
app.import('bower_components/loader.js/loader.js');
|
app.import('bower_components/loader.js/loader.js');
|
||||||
app.import('bower_components/jquery/dist/jquery.js');
|
app.import('bower_components/jquery/dist/jquery.js');
|
||||||
|
|
|
@ -1,47 +1,47 @@
|
||||||
/* jshint node: true */
|
/* jshint node: true */
|
||||||
|
/* jscs:disable disallowEmptyBlocks */
|
||||||
|
|
||||||
module.exports = function(environment) {
|
module.exports = function (environment) {
|
||||||
var ENV = {
|
var ENV = {
|
||||||
modulePrefix: 'ghost',
|
modulePrefix: 'ghost',
|
||||||
environment: environment,
|
environment: environment,
|
||||||
baseURL: '/',
|
baseURL: '/',
|
||||||
locationType: 'auto',
|
locationType: 'auto',
|
||||||
EmberENV: {
|
EmberENV: {
|
||||||
FEATURES: {
|
FEATURES: {
|
||||||
// Here you can enable experimental features on an ember canary build
|
// Here you can enable experimental features on an ember canary build
|
||||||
// e.g. 'with-controller': true
|
// e.g. 'with-controller': true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
APP: {
|
APP: {
|
||||||
// Here you can pass flags/options to your application instance
|
// Here you can pass flags/options to your application instance
|
||||||
// when it is created
|
// when it is created
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (environment === 'development') {
|
||||||
|
// ENV.APP.LOG_RESOLVER = true;
|
||||||
|
ENV.APP.LOG_ACTIVE_GENERATION = true;
|
||||||
|
ENV.APP.LOG_TRANSITIONS = true;
|
||||||
|
ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
||||||
|
ENV.APP.LOG_VIEW_LOOKUPS = true;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
if (environment === 'development') {
|
if (environment === 'test') {
|
||||||
// ENV.APP.LOG_RESOLVER = true;
|
// Testem prefers this...
|
||||||
ENV.APP.LOG_ACTIVE_GENERATION = true;
|
ENV.baseURL = '/';
|
||||||
ENV.APP.LOG_TRANSITIONS = true;
|
ENV.locationType = 'none';
|
||||||
ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
|
||||||
ENV.APP.LOG_VIEW_LOOKUPS = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (environment === 'test') {
|
// keep test console output quieter
|
||||||
// Testem prefers this...
|
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
||||||
ENV.baseURL = '/';
|
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
||||||
ENV.locationType = 'none';
|
|
||||||
|
|
||||||
// keep test console output quieter
|
ENV.APP.rootElement = '#ember-testing';
|
||||||
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
}
|
||||||
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
|
||||||
|
|
||||||
ENV.APP.rootElement = '#ember-testing';
|
if (environment === 'production') {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (environment === 'production') {
|
return ENV;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return ENV;
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'asset-delivery',
|
name: 'asset-delivery',
|
||||||
postBuild: function (results) {
|
postBuild: function (results) {
|
||||||
var fs = this.project.require('fs-extra');
|
var fs = this.project.require('fs-extra');
|
||||||
|
|
||||||
fs.copySync(results.directory + '/index.html', '../server/views/default.hbs');
|
fs.copySync(results.directory + '/index.html', '../server/views/default.hbs');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,17 +3,19 @@ import Application from '../../app';
|
||||||
import Router from '../../router';
|
import Router from '../../router';
|
||||||
import config from '../../config/environment';
|
import config from '../../config/environment';
|
||||||
|
|
||||||
export default function startApp(attrs) {
|
function startApp(attrs) {
|
||||||
var application;
|
var application,
|
||||||
|
attributes = Ember.merge({}, config.APP);
|
||||||
|
|
||||||
var attributes = Ember.merge({}, config.APP);
|
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
|
||||||
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
|
|
||||||
|
|
||||||
Ember.run(function() {
|
Ember.run(function () {
|
||||||
application = Application.create(attributes);
|
application = Application.create(attributes);
|
||||||
application.setupForTesting();
|
application.setupForTesting();
|
||||||
application.injectTestHelpers();
|
application.injectTestHelpers();
|
||||||
});
|
});
|
||||||
|
|
||||||
return application;
|
return application;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default startApp;
|
||||||
|
|
Loading…
Reference in a new issue