UNPKG

2.12 kBMarkdownView Raw
1# esca-scripts
2
3Reusable CLI scripts for devops.
4
5## Installation
6
7Local:
8
9```bash
10yarn add esca-scripts
11```
12
13Or global:
14
15```bash
16yarn global add esca-scripts
17```
18
19## Usage
20
21```bash
22esca-scripts <command>
23```
24
25### build
26
27Build distributable files
28
29Option | 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
38Build distributable bundle file for browser
39
40Option | 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
50Live develop in browser
51
52Option | 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
61Renames project files
62
63Option | Description | Default
64--- | --- | ---
65`--name` | The new name | (Working directory name)
66
67### reset
68
69Resets and renames project
70
71Option | Description | Default
72--- | --- | ---
73`--name` | The new name | (Working directory name)
74
75### run
76
77Run a file in Node.js
78
79Option | Description | Default
80--- | --- | ---
81`--file` | The file to run | `"./src/index"`
82`--no-react` | Creates configs without React | (Off)
83
84### serve
85
86Serve a directory of static files
87
88Option | Description | Default
89--- | --- | ---
90`--dir` | The directory to serve | `"dist"`
91`--no-open` | Prevents browser from opening | (Off)
92
93### test
94
95Runs tests
96
97### config
98
99Copies configs
100
101Command | Description
102--- | ---
103`babel` | Copies Babel config
104`postcss` | Copies PostCSS config
\No newline at end of file