UNPKG

3.32 kBMarkdownView Raw
1ababel
2==========
3
4<!---
5This file is generated by ape-tmpl. Do not update manually.
6--->
7
8<!-- Badge Start -->
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<!-- Badge End -->
32
33
34<!-- Description Start -->
35<a name="description"></a>
36
37Compile with babel only when file changed from last time.
38
39<!-- Description End -->
40
41
42<!-- Overview Start -->
43<a name="overview"></a>
44
45
46
47<!-- Overview End -->
48
49
50<!-- Sections Start -->
51<a name="sections"></a>
52
53<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->
54
55<a name="section-doc-guides-01-installation-md"></a>
56
57Installation
58-----
59
60```bash
61$ npm install ababel --save
62```
63
64
65<!-- Section from "doc/guides/01.Installation.md.hbs" End -->
66
67<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
68
69<a name="section-doc-guides-02-usage-md"></a>
70
71Usage
72---------
73
74```javascript
75'use strict'
76
77const ababel = require('ababel')
78
79void 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<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
93
94<!-- Section from "doc/guides/03.Signature.md.hbs" Start -->
95
96<a name="section-doc-guides-03-signature-md"></a>
97
98Signature
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<!-- Section from "doc/guides/03.Signature.md.hbs" End -->
118
119
120<!-- Sections Start -->
121
122
123<!-- LICENSE Start -->
124<a name="license"></a>
125
126License
127-------
128This software is released under the [MIT License](https://github.com/a-labo/ababel/blob/master/LICENSE).
129
130<!-- LICENSE End -->
131
132
133<!-- Links Start -->
134<a name="links"></a>
135
136Links
137------
138
139+ [Babel][babel_url]
140
141[babel_url]: https://babeljs.io/
142
143<!-- Links End -->