mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-08 04:03:12 +03:00
920406c252
Temporarily reverting in order to get the next alpha release out. Unfortunately this has the unintended consequence of the service worker caching a 200 response for /ghost/ so when starting a new blog the redirect to /setup/one that the server sends is never picked up. This would only affect developers using localhost/people trying to set up a blog multiple times on the same domain but as that's the target audience for the alpha it's probably best to avoid any confusion.
23 lines
774 B
JavaScript
23 lines
774 B
JavaScript
/* eslint-disable */
|
|
module.exports = {
|
|
name: 'asset-delivery',
|
|
postBuild: function (results) {
|
|
var fs = this.project.require('fs-extra'),
|
|
walkSync = this.project.require('walk-sync'),
|
|
assetsIn = results.directory + '/assets',
|
|
templateOut = '../server/views/default.hbs',
|
|
assetsOut = '../built/assets',
|
|
assets = walkSync(assetsIn);
|
|
|
|
fs.ensureDirSync(assetsOut);
|
|
|
|
fs.copySync(results.directory + '/index.html', templateOut, {overwrite: true});
|
|
|
|
assets.forEach(function (relativePath) {
|
|
if (relativePath.slice(-1) === '/') { return; }
|
|
|
|
fs.copySync(assetsIn + '/' + relativePath, assetsOut + '/' + relativePath, {overwrite: true});
|
|
});
|
|
}
|
|
};
|