UNPKG

4.55 kBMarkdownView Raw
1![Abigail](https://cloud.githubusercontent.com/assets/1548478/14227243/06457ec6-f934-11e5-9b30-a37a13ce1d4e.png)
2---
3
4<p align="right">
5 <a href="https://npmjs.org/package/abigail">
6 <img src="https://img.shields.io/npm/v/abigail.svg?style=flat-square">
7 </a>
8 <a href="https://travis-ci.org/abigailjs/abigail">
9 <img src="http://img.shields.io/travis/abigailjs/abigail.svg?style=flat-square">
10 </a>
11 <a href="https://codeclimate.com/github/abigailjs/abigail/coverage">
12 <img src="https://img.shields.io/codeclimate/github/abigailjs/abigail.svg?style=flat-square">
13 </a>
14 <a href="https://codeclimate.com/github/abigailjs/abigail">
15 <img src="https://img.shields.io/codeclimate/coverage/github/abigailjs/abigail.svg?style=flat-square">
16 </a>
17 <a href="https://gemnasium.com/abigailjs/abigail">
18 <img src="https://img.shields.io/gemnasium/abigailjs/abigail.svg?style=flat-square">
19 </a>
20</p>
21
22Installation
23---
24```bash
25npm install abigail --global
26```
27
28Usage
29---
30
31abigail is [npm scripts](https://docs.npmjs.com/misc/scripts) emulator.
32you can succinctly describe the serial execution and watch files.
33
34```bash
35abby test, lint, cover
36# + 0 ms @_@ use package.json.
37# + 2 ms @_@ plugin enabled exit, log, launch, watch.
38# + 23 ms @_@ task start test, lint, cover.
39# + 0 ms @_@ task end test, lint, cover. exit code 0, 0, 0.
40# + 0 ms @_@ ... watch at src/**/*.js, test/**/*.js.
41```
42
43in addition, makes it easy to change the settings using optional arguments.
44
45```bash
46abby test --no-watch
47# + 2 ms @_@ task start test.
48# + 2.4 s @_@ task end test. exit code 0.
49# + 0 ms @_@ cheers for good work.
50> _
51```
52
53or specify package.json `abigail` field.
54
55```json
56{
57 "scripts": {
58 "test": "mocha"
59 },
60 "abigail": {
61 "plugins": {
62 "watch": "*,src/**/*.jsx,test/**/*.jsx"
63 }
64 }
65}
66```
67
68```bash
69abby test
70# ... watch at *, src/**/*.jsx, test/**/*.jsx.
71```
72
73serial execution
74---
75if connecting the script name with a comma, run the script in series.
76
77```bash
78abby cover, report
79# + 23 ms @_@ task start cover, report.
80# + 3 ms @_@ script start cover.
81# + 6.3 s @_@ script end cover. exit code 0.
82# + 3 ms @_@ script start report.
83# + 6.3 s @_@ script end report. exit code 0.
84# + 5.1 s @_@ task end cover, report. exit code 0, 0.
85# + 1 ms @_@ ... watch at src/**/*.js, test/**/*.js.
86```
87
88parallel execution
89---
90unless connecting the script name with a comma, run the script in parallel.
91
92```bash
93abby babel jade stylus
94# ...
95# + 133 ms @_@ script end stylus. exit code 0.
96# + 87 ms @_@ script end jade. exit code 0.
97# + 93 ms @_@ script end babel. exit code 0.
98# + 0 ms @_@ task end babel, jade, stylus. exit code 0, 0, 0.
99```
100
101glob execution
102---
103if specify glob the script name, run the matching scripts in parallel.
104
105```bash
106abby mytask:*
107# ...
108# + 133 ms @_@ script end mytask:stylus. exit code 0.
109# + 87 ms @_@ script end mytask:jade. exit code 0.
110# + 93 ms @_@ script end mytask:babel. exit code 0.
111# + 0 ms @_@ task end mytask:babel, mytask:jade, mytask:stylus. exit code 0, 0, 0.
112```
113
114force execution
115---
116if specify `--launch force`, ignores the error and continues serial execution.
117
118```bash
119abby cover, report
120# + 23 ms @_@ task start cover, report.
121# + 3 ms @_@ script start cover.
122# + 6.3 s @_@ script end cover. exit code 1.
123# + 5.1 s @_@ task end cover. exit code 1.
124# + 1 ms @_@ ... watch at src/**/*.js, test/**/*.js.
125
126abby cover, report --launch force
127# + 23 ms @_@ task start cover, report.
128# + 3 ms @_@ script start cover.
129# ...
130# + 6.3 s @_@ script end cover. exit code 1.
131# + 3 ms @_@ script start report.
132# ...
133# + 198 ms @_@ script end report. exit code 0.
134# + 2 ms @_@ task end cover, report. exit code 1, 0.
135# + 1 ms @_@ ... watch at src/**/*.js, test/**/*.js.
136```
137
138See also
139---
140* [abigail-plugin-exit](https://github.com/abigailjs/abigail-plugin-exit#usage)
141* [abigail-plugin-launch](https://github.com/abigailjs/abigail-plugin-launch#usage)
142* [abigail-plugin-log](https://github.com/abigailjs/abigail-plugin-log#usage)
143* [abigail-plugin-parse](https://github.com/abigailjs/abigail-plugin-parse#usage)
144* [abigail-plugin-watch](https://github.com/abigailjs/abigail-plugin-watch#usage)
145
146Inspired by
147---
148* [npm-run-all](https://github.com/mysticatea/npm-run-all)
149* [onchange](https://github.com/Qard/onchange)
150
151Development
152---
153Requirement global
154* NodeJS v5.7.0
155* Npm v3.7.1
156
157```bash
158git clone https://github.com/abigailjs/abigail
159cd abigail
160npm install
161
162npm test
163```
164
165License
166---
167[MIT](http://59naga.mit-license.org/)