1 | # esca-scripts
|
2 |
|
3 | Reusable CLI scripts for devops.
|
4 |
|
5 | ## Installation
|
6 |
|
7 | Local:
|
8 |
|
9 | ```bash
|
10 | yarn add esca-scripts
|
11 | ```
|
12 |
|
13 | Or global:
|
14 |
|
15 | ```bash
|
16 | yarn global add esca-scripts
|
17 | ```
|
18 |
|
19 | ## Usage
|
20 |
|
21 | ```bash
|
22 | esca-scripts <command>
|
23 | ```
|
24 |
|
25 | ### build
|
26 |
|
27 | Build distributable files
|
28 |
|
29 | Option | Description | Default
|
30 | --- | --- | ---
|
31 | `--src` | The source directory of your project | `"src"`
|
32 | `--dist` | The distribution directory your project will compile to | `"dist"`
|
33 | `--no-react` | Creates configs without React | (Off)
|
34 | `--no-css` | Creates configs without PostCSS | (Off)
|
35 |
|
36 | ### bundle
|
37 |
|
38 | Build distributable bundle file for browser
|
39 |
|
40 | Option | Description | Default
|
41 | --- | --- | ---
|
42 | `--src` | The source file of your project | `"dev/index.html"`
|
43 | `--dist` | The distribution file/directory your project will compile to | `"dist-dev/index.html"`
|
44 | `--global` | Pass in a name to your export as `window.{your_name} | (Off)
|
45 | `--no-react` | Creates configs without React | (Off)
|
46 | `--no-css` | Creates configs without PostCSS | (Off)
|
47 |
|
48 | ### dev
|
49 |
|
50 | Live develop in browser
|
51 |
|
52 | Option | Description | Default
|
53 | --- | --- | ---
|
54 | `--src` | The source file of your project | `"dev/index.html"`
|
55 | `--dist` | The distribution file/directory your project will compile to | `"dist-dev/index.html"`
|
56 | `--no-react` | Creates configs without React | (Off)
|
57 | `--no-css` | Creates configs without PostCSS | (Off)
|
58 |
|
59 | ### rename
|
60 |
|
61 | Renames project files
|
62 |
|
63 | Option | Description | Default
|
64 | --- | --- | ---
|
65 | `--name` | The new name | (Working directory name)
|
66 |
|
67 | ### reset
|
68 |
|
69 | Resets and renames project
|
70 |
|
71 | Option | Description | Default
|
72 | --- | --- | ---
|
73 | `--name` | The new name | (Working directory name)
|
74 |
|
75 | ### run
|
76 |
|
77 | Run a file in Node.js
|
78 |
|
79 | Option | Description | Default
|
80 | --- | --- | ---
|
81 | `--file` | The file to run | `"./src/index"`
|
82 | `--no-react` | Creates configs without React | (Off)
|
83 |
|
84 | ### serve
|
85 |
|
86 | Serve a directory of static files
|
87 |
|
88 | Option | Description | Default
|
89 | --- | --- | ---
|
90 | `--dir` | The directory to serve | `"dist"`
|
91 | `--no-open` | Prevents browser from opening | (Off)
|
92 |
|
93 | ### test
|
94 |
|
95 | Runs tests
|
96 |
|
97 | ### config
|
98 |
|
99 | Copies configs
|
100 |
|
101 | Command | Description
|
102 | --- | ---
|
103 | `babel` | Copies Babel config
|
104 | `postcss` | Copies PostCSS config |
\ | No newline at end of file |