-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathsao.js
67 lines (64 loc) · 1.51 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
67
const superb = require('superb')
module.exports = {
prompts: {
name: {
message: `What's the name of your new project`,
default: ':folderName:'
},
description: {
message: 'How would your describe your superb project',
default: `My ${superb()} Vue project`
},
pwa: {
type: 'confirm',
default: true,
message: 'Add Progressive Web App (PWA) support',
store: true
},
manifest: {
type: 'confirm',
default: true,
when: 'pwa',
message: 'Use default manifest.json and icons for PWA',
store: true
},
unitTest: {
type: 'confirm',
default: true,
message: 'Use Tyu(Jest) to run unit tests',
store: true
},
username: {
message: `What's your GitHub username`,
default: ':gitUser:',
store: true
},
email: {
message: `What's your GitHub email`,
default: ':gitEmail:',
store: true
}
},
move: {
gitignore: '.gitignore'
},
filters: {
'src/pwa.js': 'pwa',
'static/manifest.json': 'manifest',
'static/icons/**': 'manifest',
'src/components/App.test.js': 'unitTest'
},
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()
}
}