-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsao.js
66 lines (63 loc) · 1.59 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
57
58
59
60
61
62
63
64
65
66
const superb = require('superb')
module.exports = {
prompts: {
name: {
message: `What's the name of your new project`,
default: ':folderName:'
},
description: {
message: 'How would your descripe your superb project',
default: `My ${superb()} Vue project`
},
test: {
type: 'list',
default: 'disable',
message: 'Choose a test runner for unit tests',
choices: [
{name: 'Disable', value: 'disable'},
{name: 'AVA', value: 'ava'},
{name: 'Karma', value: 'karma'}
]
},
pwa: {
type: 'confirm',
default: true,
message: 'Add Progress Web App support'
},
manifest: {
type: 'confirm',
default: true,
when: 'pwa',
message: 'Use default manifest.json and icons for PWA'
},
username: {
message: `What's your GitHub username`,
default: ':gitUser:'
},
email: {
message: `What's your GitHub email`,
default: ':gitEmail:'
}
},
move: {
'gitignore': '.gitignore'
},
filters: {
'src/components/App.test.js': 'test === "karma"',
'src/pwa.js': "pwa",
'static/manifest.json': 'manifest',
'static/icons/**': 'manifest',
'test/**': 'test === "ava"'
},
gitInit: true,
installDependencies: true,
post(_) {
_.showTip()
console.log(_.chalk.cyan('\n To develop it:'))
console.log('\n yarn dev')
console.log(_.chalk.cyan('\n To build for production:'))
console.log('\n yarn build')
console.log(_.chalk.dim('\n For more usages, please check out ./README.md'))
console.log()
}
}