Skip to content

Instantly share code, notes, and snippets.

@egoist
Last active January 6, 2017 15:41
Show Gist options
  • Save egoist/46fc4e3a672950ac64a4448863d2fae9 to your computer and use it in GitHub Desktop.
Save egoist/46fc4e3a672950ac64a4448863d2fae9 to your computer and use it in GitHub Desktop.
module.exports = {
template: 'handlebars',
templateOptions: {
helpers: {
raw: function(options) {
return options.fn(this)
}
}
},
prompts: {
name: {
'type': 'string',
'required': true,
'message': 'Project name',
'role': 'folder:name'
},
description: {
'type': 'string',
'required': false,
'message': 'Project description',
'default': 'An Adonis and Nuxt.js project'
},
author: {
'type': 'string',
'message': 'Author',
'role': 'git:name'
},
},
post(ctx) {
ctx.install() // npm/yarn install
ctx.init() // git init
ctx.log.success('Done!')
console.log(ctx.chalk.bold(` To get started:\n`))
if (ctx.isNewFolder) {
console.log(` cd ${ctx.folderName}`)
}
console.log(` mv .env.example .env`)
console.log(` npm run dev\n`)
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment