mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 04:13:30 +03:00
Merge pull request #5703 from rwjblue/fix-release-issues
Fix release build issues.
This commit is contained in:
commit
dd8c7da13e
@ -1,7 +1,9 @@
|
||||
/* global require, module */
|
||||
|
||||
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},
|
||||
assetLocation,
|
||||
app;
|
||||
@ -27,7 +29,9 @@ app = new EmberApp({
|
||||
source: './app/styles/app.css',
|
||||
inputFile: 'app.css',
|
||||
browsers: 'last 2 versions',
|
||||
outputFile: 'ghost.css'
|
||||
sourcemap: !mythCompress,
|
||||
compress: mythCompress,
|
||||
outputFile: isProduction ? 'ghost.min.css' : 'ghost.css'
|
||||
},
|
||||
hinting: false,
|
||||
fingerprint: disabled
|
||||
|
@ -41,9 +41,6 @@ module.exports = function (environment) {
|
||||
ENV.APP.LOG_TRANSITIONS = true;
|
||||
ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
||||
ENV.APP.LOG_VIEW_LOOKUPS = true;
|
||||
ENV.mythOptions = {
|
||||
sourcemap: true
|
||||
};
|
||||
}
|
||||
|
||||
if (environment === 'test') {
|
||||
@ -56,17 +53,6 @@ module.exports = function (environment) {
|
||||
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
||||
|
||||
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;
|
||||
|
@ -2,15 +2,20 @@ module.exports = {
|
||||
name: 'asset-delivery',
|
||||
postBuild: function (results) {
|
||||
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',
|
||||
assetsOut = '../built/assets';
|
||||
assetsOut = '../built/assets',
|
||||
assets = walkSync(assetsIn);
|
||||
|
||||
fs.removeSync(templateOut);
|
||||
fs.removeSync(assetsOut);
|
||||
fs.ensureDirSync(assetsOut);
|
||||
|
||||
cpd.sync(results.directory + '/index.html', templateOut);
|
||||
cpd.sync(results.directory + '/assets', assetsOut);
|
||||
fs.copySync(results.directory + '/index.html', templateOut, {clobber: true});
|
||||
|
||||
assets.forEach(function (relativePath) {
|
||||
if (relativePath.slice(-1) === '/') { return; }
|
||||
|
||||
fs.copySync(assetsIn + '/' + relativePath, assetsOut + '/' + relativePath, {clobber:true});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -24,7 +24,6 @@
|
||||
"ember-cli-app-version": "0.3.3",
|
||||
"ember-cli-babel": "^5.0.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-fastclick": "1.0.3",
|
||||
"ember-cli-htmlbars": "0.7.6",
|
||||
@ -39,7 +38,8 @@
|
||||
"ember-myth": "0.1.1",
|
||||
"ember-sinon": "0.2.1",
|
||||
"fs-extra": "0.16.3",
|
||||
"glob": "^4.0.5"
|
||||
"glob": "^4.0.5",
|
||||
"walk-sync": "^0.1.3"
|
||||
},
|
||||
"ember-addon": {
|
||||
"paths": [
|
||||
|
Loading…
Reference in New Issue
Block a user