1 | ababel
|
2 | ==========
|
3 |
|
4 |
|
5 | This file is generated by ape-tmpl. Do not update manually.
|
6 | --->
|
7 |
|
8 |
|
9 | <a name="badges"></a>
|
10 |
|
11 | [![Build Status][bd_travis_shield_url]][bd_travis_url]
|
12 | [![npm Version][bd_npm_shield_url]][bd_npm_url]
|
13 | [![JS Standard][bd_standard_shield_url]][bd_standard_url]
|
14 |
|
15 | [bd_repo_url]: https://github.com/a-labo/ababel
|
16 | [bd_travis_url]: http://travis-ci.org/a-labo/ababel
|
17 | [bd_travis_shield_url]: http://img.shields.io/travis/a-labo/ababel.svg?style=flat
|
18 | [bd_travis_com_url]: http://travis-ci.com/a-labo/ababel
|
19 | [bd_travis_com_shield_url]: https://api.travis-ci.com/a-labo/ababel.svg?token=
|
20 | [bd_license_url]: https://github.com/a-labo/ababel/blob/master/LICENSE
|
21 | [bd_codeclimate_url]: http://codeclimate.com/github/a-labo/ababel
|
22 | [bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/a-labo/ababel.svg?style=flat
|
23 | [bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/a-labo/ababel.svg?style=flat
|
24 | [bd_gemnasium_url]: https://gemnasium.com/a-labo/ababel
|
25 | [bd_gemnasium_shield_url]: https://gemnasium.com/a-labo/ababel.svg
|
26 | [bd_npm_url]: http://www.npmjs.org/package/ababel
|
27 | [bd_npm_shield_url]: http://img.shields.io/npm/v/ababel.svg?style=flat
|
28 | [bd_standard_url]: http://standardjs.com/
|
29 | [bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | <a name="description"></a>
|
36 |
|
37 | Compile with babel only when file changed from last time.
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | <a name="overview"></a>
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | <a name="sections"></a>
|
52 |
|
53 |
|
54 |
|
55 | <a name="section-doc-guides-01-installation-md"></a>
|
56 |
|
57 | Installation
|
58 | -----
|
59 |
|
60 | ```bash
|
61 | $ npm install ababel --save
|
62 | ```
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 | <a name="section-doc-guides-02-usage-md"></a>
|
70 |
|
71 | Usage
|
72 | ---------
|
73 |
|
74 | ```javascript
|
75 | 'use strict'
|
76 |
|
77 | const ababel = require('ababel')
|
78 |
|
79 | void async function () {
|
80 | await ababel('**/*.jsx', {
|
81 | cwd: 'src',
|
82 | out: 'dest',
|
83 | minified: true,
|
84 | presets: ['es2015', 'react']
|
85 | })
|
86 | }().catch((err) => console.error(err))
|
87 |
|
88 |
|
89 | ```
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 | <a name="section-doc-guides-03-signature-md"></a>
|
97 |
|
98 | Signature
|
99 | ---------
|
100 |
|
101 | `ababel(pattern, options) -> Promise`
|
102 |
|
103 | ### Params
|
104 |
|
105 | | Name | Type | Description |
|
106 | | ----- | --- | -------- |
|
107 | | pattern | string | Glob file name pattern |
|
108 | | options | Object | Optional settings |
|
109 | | options.status | string | Status file path |
|
110 | | options.cwd | string | Current working directory path |
|
111 | | options.out | string | Output directory path |
|
112 | | options.minified | boolean | Minified or not |
|
113 | | options.reflects | string[] | File patterns to reflects changes |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 | <a name="license"></a>
|
125 |
|
126 | License
|
127 | -------
|
128 | This software is released under the [MIT License](https://github.com/a-labo/ababel/blob/master/LICENSE).
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 | <a name="links"></a>
|
135 |
|
136 | Links
|
137 | ------
|
138 |
|
139 | + [Babel][babel_url]
|
140 |
|
141 | [babel_url]: https://babeljs.io/
|
142 |
|
143 |
|