forked from egoist/vuepack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sao.js
56 lines (56 loc) · 1.44 KB
/
sao.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
module.exports = {
template: 'handlebars',
prompts: {
name: {
required: true,
message: 'Project name',
role: 'folder:name'
},
description: {
required: false,
message: 'Project description',
default: 'My Superb Vue Project'
},
author: {
message: 'Author',
role: 'git:name'
},
eslint: {
type: 'confirm',
message: 'Do you want to support ESLint?'
},
jsx: {
type: 'confirm',
message: 'Generate components in JSX format?',
default: false
},
electron: {
type: 'confirm',
message: 'Support Electron?',
default: false
},
"testcafe": {
"type": "confirm",
"message": "Add testcafe to run integration tests?",
"default": false
}
},
filters: {
'client/components/*.vue': '!jsx',
'client/components/**/*.{js,css}': 'jsx',
'client/views/*.vue': '!jsx',
'client/views/**/*.{js,css}': 'jsx',
'app/*': 'electron',
'.eslintrc': 'eslint',
"test/e2e/*": "testcafe"
},
post({log, folderName, isNewFolder, chalk}) {
log.success(`Your new Vue project has been successfully generated in ${chalk.underline(folderName)}!`)
console.log(chalk.bold(` To get started:\n`))
if (isNewFolder) console.log(` cd ${folderName}`)
console.log(` yarn`)
console.log(` yarn dev\n`)
console.log(chalk.bold(` To build for production:\n`))
console.log(` yarn build\n`)
}
}