mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merge core/built instead of clearing on every build.
This commit is contained in:
parent
4a90d42132
commit
5e58b1317e
2 changed files with 13 additions and 8 deletions
|
@ -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});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -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": [
|
||||||
|
|
Loading…
Reference in a new issue