1 | 'use strict'
|
2 | const co = require('co')
|
3 | const prompt = require('co-prompt')
|
4 | const chalk = require('chalk')
|
5 | const fs = require('fs')
|
6 | const initCatalog = require('./initCatalog/index.js')
|
7 | const path = require('path')
|
8 |
|
9 | module.exports = ()=>{
|
10 | co(function *() {
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | let catalogName = yield prompt('请输入要创建的项目名: ')
|
18 | let es6 = yield prompt('是否需要编译js(Y/N): ')
|
19 | let scss = yield prompt('是否需要编译scss(Y/N): ')
|
20 | let option = {
|
21 | catalogName,
|
22 | scss,
|
23 | es6
|
24 | }
|
25 | initCatalog(catalogName,option)
|
26 | })
|
27 | }
|