1 | # Fire Keeper
|
2 |
|
3 | 一个简单的项目构建工具。
|
4 |
|
5 | ## 安装
|
6 |
|
7 | ```shell
|
8 | npm install --save-dev fire-keeper
|
9 | ```
|
10 |
|
11 | ## 使用
|
12 |
|
13 | 首先,在代码中引入模块。
|
14 |
|
15 | ```coffeescript
|
16 | $ = require 'fire-keeper'
|
17 | ```
|
18 |
|
19 | 之后就可以愉快地玩耍啦。
|
20 |
|
21 | ```coffeescript
|
22 | $.task 'build', -> await $.compile_ './source/index.coffee', './'
|
23 | ```
|
24 |
|
25 | ## 方法
|
26 |
|
27 | 以`_`结尾的方法均为`async function`,需要加`await`调用。
|
28 | 在调用方法时,`_`亦可视作`async`的缩写。
|
29 |
|
30 | ```coffeescript
|
31 | pkg = await $.readAsync './package.json'
|
32 | # 等同于 $.read_()
|
33 | ```
|
34 |
|
35 | - [$.backup_(source)](doc/backup.md)
|
36 | - [$.chain(fn)](doc/chain.md)
|
37 | - [$.clean_(source)](doc/clean.md)
|
38 | - [$.copy_(source, target, [option])](doc/copy.md)
|
39 | - [$.delay_([time])](doc/delay.md)
|
40 | - [$.isExisted_(source)](doc/isExisted.md)
|
41 | - [$.isSame_(source)](doc/isSame.md)
|
42 | - [$.link_(source, target)](doc/link.md)
|
43 | - [$.mkdir_(source)](doc/mkdir.md)
|
44 | - [$.move_(source, target)](doc/move.md)
|
45 | - [$.read_(source, [option])](doc/read.md)
|
46 | - [$.recover_(source)](doc/recover.md)
|
47 | - [$.remove_(source)](doc/remove.md)
|
48 | - [$.say_(text, [option])](doc/say.md)
|
49 | - [$.source_(source, [option])](doc/source.md)
|
50 | - [$.task(name, [fn])](doc/task.md)
|
51 | - [$.update_()](doc/update.md)
|
52 | - [$.write_(source, data, [option])](doc/write.md)
|
53 | - [$.zip_(source, [target], [option])](doc/zip.md)
|
54 |
|
55 | - $.compile_(source, [target], [option])
|
56 | - $.download_(source, target, [option])
|
57 | - $.exec_(cmd, [option])
|
58 | - $.getBaseame(source)
|
59 | - $.getDirname(source)
|
60 | - $.getExtname(source)
|
61 | - $.getFilename(source)
|
62 | - $.getName(source)
|
63 | - $.lint_(source)
|
64 | - $.prompt_(option)
|
65 | - $.reload(source)
|
66 | - $.rename_(source, option)
|
67 | - $.ssh()
|
68 | - $.ssh().connect_(option)
|
69 | - $.ssh().disconnect_()
|
70 | - $.ssh().exec_(cmd, [option])
|
71 | - $.ssh().mkdir_(source)
|
72 | - $.ssh().remove_(source)
|
73 | - $.ssh().upload_(source, target, [option])
|
74 | - $.stat_(source)
|
75 | - $.walk_(source, callback)
|
76 | - $.watch(source)
|
77 | - $.yargs()
|
78 |
|
79 | ## 变量
|
80 |
|
81 | ```coffeescript
|
82 | $.argv # 命令行的传入参数
|
83 | $.os # 系统信息
|
84 | $.path # 路径信息
|
85 | ```
|
86 |
|
87 | ## 库
|
88 |
|
89 | ```coffeescript
|
90 | $.library._ # lodash
|
91 | $.library.fse # fs-extra
|
92 | $.library.gulp # gulp
|
93 | ```
|
94 |
|
95 | ## 测试
|
96 |
|
97 | ```shell
|
98 | gulp test
|
99 | ```
|
100 |
|
101 | ## 注意
|
102 |
|
103 | 该项目**可能并不稳定**。 |
\ | No newline at end of file |