mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
Fix up ember-cli generated files and misc jscs/jshint errors
This commit is contained in:
parent
9bece8efdb
commit
793831ffdf
4 changed files with 56 additions and 55 deletions
11
Brocfile.js
11
Brocfile.js
|
@ -1,12 +1,11 @@
|
|||
/* 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(
|
||||
{
|
||||
sourcemaps: {enabled: false} //see https://github.com/ember-cli/ember-cli/issues/2912
|
||||
}
|
||||
);
|
||||
app = new EmberApp({
|
||||
hinting: false,
|
||||
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/jquery/dist/jquery.js');
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
/* jshint node: true */
|
||||
/* jscs:disable disallowEmptyBlocks */
|
||||
|
||||
module.exports = function(environment) {
|
||||
var ENV = {
|
||||
modulePrefix: 'ghost',
|
||||
environment: environment,
|
||||
baseURL: '/',
|
||||
locationType: 'auto',
|
||||
EmberENV: {
|
||||
FEATURES: {
|
||||
// Here you can enable experimental features on an ember canary build
|
||||
// e.g. 'with-controller': true
|
||||
}
|
||||
},
|
||||
module.exports = function (environment) {
|
||||
var ENV = {
|
||||
modulePrefix: 'ghost',
|
||||
environment: environment,
|
||||
baseURL: '/',
|
||||
locationType: 'auto',
|
||||
EmberENV: {
|
||||
FEATURES: {
|
||||
// Here you can enable experimental features on an ember canary build
|
||||
// e.g. 'with-controller': true
|
||||
}
|
||||
},
|
||||
|
||||
APP: {
|
||||
// Here you can pass flags/options to your application instance
|
||||
// when it is created
|
||||
APP: {
|
||||
// Here you can pass flags/options to your application instance
|
||||
// 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') {
|
||||
// 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 === 'test') {
|
||||
// Testem prefers this...
|
||||
ENV.baseURL = '/';
|
||||
ENV.locationType = 'none';
|
||||
|
||||
if (environment === 'test') {
|
||||
// Testem prefers this...
|
||||
ENV.baseURL = '/';
|
||||
ENV.locationType = 'none';
|
||||
// keep test console output quieter
|
||||
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
||||
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
||||
|
||||
// keep test console output quieter
|
||||
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
||||
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
||||
ENV.APP.rootElement = '#ember-testing';
|
||||
}
|
||||
|
||||
ENV.APP.rootElement = '#ember-testing';
|
||||
}
|
||||
if (environment === 'production') {
|
||||
}
|
||||
|
||||
if (environment === 'production') {
|
||||
|
||||
}
|
||||
|
||||
return ENV;
|
||||
return ENV;
|
||||
};
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
module.exports = {
|
||||
name: 'asset-delivery',
|
||||
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 config from '../../config/environment';
|
||||
|
||||
export default function startApp(attrs) {
|
||||
var application;
|
||||
function startApp(attrs) {
|
||||
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() {
|
||||
application = Application.create(attributes);
|
||||
application.setupForTesting();
|
||||
application.injectTestHelpers();
|
||||
});
|
||||
Ember.run(function () {
|
||||
application = Application.create(attributes);
|
||||
application.setupForTesting();
|
||||
application.injectTestHelpers();
|
||||
});
|
||||
|
||||
return application;
|
||||
return application;
|
||||
}
|
||||
|
||||
export default startApp;
|
||||
|
|
Loading…
Reference in a new issue