1 | # SB-Babel-CLI
|
2 |
|
3 | A smarter babel-cli. Supports caching and removing extra files from output directories.
|
4 |
|
5 | Also supports running apps like nodemon, with `--execute/-x`, `--execute-delay`
|
6 |
|
7 | **Note:** For Babel 6, see [0.1.x branch](https://github.com/steelbrain/babel-cli/tree/0.1.x)
|
8 |
|
9 | ### Installation
|
10 |
|
11 | ```
|
12 | npm install --save-dev sb-babel-cli
|
13 | # OR Use with npx directory:
|
14 | npx sb-babel-cli [options] <source directory>
|
15 | ```
|
16 |
|
17 | ### Usage
|
18 |
|
19 | ```
|
20 | Usage: sb-babel-cli [options] <source directory>
|
21 |
|
22 | A smarter babel-cli
|
23 |
|
24 |
|
25 | Options:
|
26 |
|
27 | -V, --version output the version number
|
28 | -w, --watch Watch files for changes
|
29 | --ignored <list> Ignored files and directories that match the given globs
|
30 | --write-flow-sources Write .flow files that are symlinked to source files. Helps with monorepos in some cases
|
31 | --disable-cache Force recompile all files ignoring cache
|
32 | --keep-extra-files Do NOT delete extra files in the output directory
|
33 | -o, --output-directory <directory> Output directory to write transpiled files to
|
34 | -x, --execute <entryFile> Relative path of file to execute (only supported in watcher mode)
|
35 | --execute-delay <delay> Delay in ms to in between restarts of executed file
|
36 | -h, --help output usage information
|
37 | ```
|
38 |
|
39 | ### Examples
|
40 |
|
41 | ```
|
42 | # To compile contents of src to lib directory
|
43 | $ sb-babel-cli src -o lib
|
44 | # To compile contents of src to lib directory and execute lib/server
|
45 | $ sb-babel-cli src -o lib -x lib/server
|
46 | ```
|
47 |
|
48 | ### License
|
49 |
|
50 | This project is licensed under the terms of the MIT License. See the LICENSE file for more info.
|