UNPKG

1.79 kBMarkdownView Raw
1# SB-Babel-CLI
2
3A smarter babel-cli. Supports caching and removing extra files from output directories.
4
5Also 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```
12npm install --save-dev sb-babel-cli
13# OR Use with npx directory:
14npx sb-babel-cli [options] <source directory>
15```
16
17### Usage
18
19```
20Usage: sb-babel-cli [options] <source directory>
21
22A smarter babel-cli
23
24
25Options:
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 --typescript Enables typescript support by processing .ts and .tsx files
37 -h, --help output usage information
38```
39
40### Examples
41
42```
43# To compile contents of src to lib directory
44$ sb-babel-cli src -o lib
45# To compile contents of src to lib directory and execute lib/server
46$ sb-babel-cli src -o lib -x lib/server
47```
48
49### License
50
51This project is licensed under the terms of the MIT License. See the LICENSE file for more info.