Skip to content

Commit

Permalink
feat(casper): update casper version during ghost update
Browse files Browse the repository at this point in the history
refs #225
- delete old casper version and replace with new one on update
- short term solution
  • Loading branch information
acburdine committed Jun 23, 2017
1 parent 5d89600 commit 008c393
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/commands/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ module.exports.execute = function execute(version, options) {
}, {
title: 'Linking things',
task: tasks.link
}, {
title: 'Installing new version of Casper',
task: (ctx) => {
let casperPath = path.join(process.cwd(), 'content', 'themes', 'casper');

return fs.remove(casperPath).then(() => fs.move(
path.join(ctx.installPath, 'content', 'themes', 'casper'),
casperPath
));
}
}, {
title: 'Restarting Ghost',
task: () => startCommand.execute.call(this, {quiet: true})
Expand Down

0 comments on commit 008c393

Please sign in to comment.