Merge pull request #5703 from rwjblue/fix-release-issues

Fix release build issues.
This commit is contained in:
Hannah Wolfe 2015-08-21 21:28:37 +01:00
commit dd8c7da13e
4 changed files with 19 additions and 24 deletions

View File

@ -1,7 +1,9 @@
/* global require, module */ /* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app'), var EmberApp = require('ember-cli/lib/broccoli/ember-app'),
isProduction = EmberApp.env() === 'production', environment = EmberApp.env(),
isProduction = environment === 'production',
mythCompress = isProduction || environment === 'test',
disabled = {enabled: false}, disabled = {enabled: false},
assetLocation, assetLocation,
app; app;
@ -27,7 +29,9 @@ app = new EmberApp({
source: './app/styles/app.css', source: './app/styles/app.css',
inputFile: 'app.css', inputFile: 'app.css',
browsers: 'last 2 versions', browsers: 'last 2 versions',
outputFile: 'ghost.css' sourcemap: !mythCompress,
compress: mythCompress,
outputFile: isProduction ? 'ghost.min.css' : 'ghost.css'
}, },
hinting: false, hinting: false,
fingerprint: disabled fingerprint: disabled

View File

@ -41,9 +41,6 @@ module.exports = function (environment) {
ENV.APP.LOG_TRANSITIONS = true; ENV.APP.LOG_TRANSITIONS = true;
ENV.APP.LOG_TRANSITIONS_INTERNAL = true; ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
ENV.APP.LOG_VIEW_LOOKUPS = true; ENV.APP.LOG_VIEW_LOOKUPS = true;
ENV.mythOptions = {
sourcemap: true
};
} }
if (environment === 'test') { if (environment === 'test') {
@ -56,17 +53,6 @@ module.exports = function (environment) {
ENV.APP.LOG_VIEW_LOOKUPS = false; ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.rootElement = '#ember-testing'; ENV.APP.rootElement = '#ember-testing';
ENV.mythOptions = {
compress: true,
outputFile: 'ghost.min.css'
};
}
if (environment === 'production') {
ENV.mythOptions = {
compress: true,
outputFile: 'ghost.min.css'
};
} }
return ENV; return ENV;

View File

@ -2,15 +2,20 @@ 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'),
cpd = this.project.require('ember-cli-copy-dereference'), walkSync = this.project.require('walk-sync'),
assetsIn = results.directory + '/assets',
templateOut = '../server/views/default.hbs', templateOut = '../server/views/default.hbs',
assetsOut = '../built/assets'; assetsOut = '../built/assets',
assets = walkSync(assetsIn);
fs.removeSync(templateOut);
fs.removeSync(assetsOut);
fs.ensureDirSync(assetsOut); fs.ensureDirSync(assetsOut);
cpd.sync(results.directory + '/index.html', templateOut); fs.copySync(results.directory + '/index.html', templateOut, {clobber: true});
cpd.sync(results.directory + '/assets', assetsOut);
assets.forEach(function (relativePath) {
if (relativePath.slice(-1) === '/') { return; }
fs.copySync(assetsIn + '/' + relativePath, assetsOut + '/' + relativePath, {clobber:true});
});
} }
}; };

View File

@ -24,7 +24,6 @@
"ember-cli-app-version": "0.3.3", "ember-cli-app-version": "0.3.3",
"ember-cli-babel": "^5.0.0", "ember-cli-babel": "^5.0.0",
"ember-cli-content-security-policy": "0.4.0", "ember-cli-content-security-policy": "0.4.0",
"ember-cli-copy-dereference": "1.0.0",
"ember-cli-dependency-checker": "^1.0.0", "ember-cli-dependency-checker": "^1.0.0",
"ember-cli-fastclick": "1.0.3", "ember-cli-fastclick": "1.0.3",
"ember-cli-htmlbars": "0.7.6", "ember-cli-htmlbars": "0.7.6",
@ -39,7 +38,8 @@
"ember-myth": "0.1.1", "ember-myth": "0.1.1",
"ember-sinon": "0.2.1", "ember-sinon": "0.2.1",
"fs-extra": "0.16.3", "fs-extra": "0.16.3",
"glob": "^4.0.5" "glob": "^4.0.5",
"walk-sync": "^0.1.3"
}, },
"ember-addon": { "ember-addon": {
"paths": [ "paths": [