1 | ## Summary
|
2 |
|
3 | 1. 可以作为命令行工具
|
4 | 2. 可以引用包
|
5 |
|
6 | mcfe 是美菜网内部前端开发过程中使用的一个命令行工具集.
|
7 | [http://www.meicai.cn/](http://www.meicai.cn/)
|
8 |
|
9 | ## Install
|
10 |
|
11 | npm install mcfe -g
|
12 |
|
13 | ## Usage
|
14 |
|
15 | mcfe <command> [options]
|
16 |
|
17 | Command List
|
18 |
|
19 | **ser**
|
20 | Start a local https(default) server
|
21 |
|
22 | **new**
|
23 | Create a new file in the current directory according to the template file
|
24 |
|
25 | **kp**
|
26 | Forced to kill the specific port process
|
27 |
|
28 | **module**
|
29 | Generate an es6 module reference manual of current dir
|
30 |
|
31 | **excel2json**
|
32 | Export a excel sheet to JSON file
|
33 |
|
34 |
|
35 | ## mcfe ser [options]
|
36 |
|
37 | 启动一个本地https服务, 特点:
|
38 | 1. 内置默认ssl证书,不用拷贝证书路径了,简化配置。
|
39 | 2. 模糊匹配,如: 若访问/build/app.js,若未找到,则返回以 “/build/app.“开头的且最近修改的文件,这个特性在proxy to local时非常有用.
|
40 | 3. options中指定 -d或--php 可使用本地php-fpm解析php文件.
|
41 |
|
42 | ## mcfe new [options]
|
43 |
|
44 | 在当前目录按内置模板新建文件,如vue,html文件,包含默认骨架代码,提高编码效率.
|
45 |
|
46 | ## mcfe kp [options]
|
47 | 强制杀掉指定端口的关联进程
|
48 |
|
49 | ## mcfe module [options]
|
50 | 生成当前目录中es6源文件的模块引用手册,辅助源码分析.
|
51 |
|
52 | ## mcfe excel2json [options]
|
53 | 将excel文件的指定sheet数据导出到json文件,便于js操作或文案拷贝。解除手动拷贝粘贴的苦恼.
|
54 |
|
55 | ## Command Help Detail
|
56 |
|
57 | type "mcfe help command" in your shell
|