-
Notifications
You must be signed in to change notification settings - Fork 0
/
saofile.js
35 lines (31 loc) · 897 Bytes
/
saofile.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
const {relative} = require('path')
const chalk = require('chalk')
module.exports = {
type: 'repo',
user: 'smu-heartcode',
repo: 'web-dev-materials',
actions: [
{
type: 'add',
files: [
'**'
],
filters: {
'.idea/**': 'false',
'@smu-heartcode/**': 'false',
'.gitignore': 'false',
'README.md': 'false',
'yarn.lock': 'false',
}
},
],
async completed() {
await this.npmInstall({npmClient: 'npm'})
const isNewFolder = this.outDir !== process.cwd()
const relativeOutFolder = relative(process.cwd(), this.outDir)
const cdMsg = isNewFolder ? chalk`\t{cyan cd ${relativeOutFolder}}\n` : ''
console.log(chalk`\n🎉 {bold Successfully created heartcode-web-dev project}\n`)
console.log(chalk` {bold To get started:}\n`)
console.log(chalk`${cdMsg}\t{cyan npm run dev}\n`)
}
}