|
1 | 1 | # echarts-offline-doc-cli
|
| 2 | +[](https://www.npmjs.org/package/echarts-offline-doc-cli) |
| 3 | +[](https://github.com/plainheart/echarts-offline-doc-cli/actions/workflows/deploy.yaml) |
| 4 | +[](https://npmcharts.com/compare/echarts-offline-doc-cli?minimal=true) |
| 5 | +[](https://github.com/plainheart/echarts-offline-doc-cli/blob/main/LICENSE) |
| 6 | + |
2 | 7 | A CLI tool for offline documentation of Apache ECharts.
|
3 | 8 |
|
4 |
| -# Build Steps |
| 9 | +[Preview on GitHub Pages](https://plainheart.github.io/echarts-offline-doc-cli) |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +# Get Started |
| 14 | + |
| 15 | +## Install Globally |
| 16 | + |
| 17 | +```sh |
| 18 | +npm i echarts-offline-doc-cli -g |
| 19 | +``` |
| 20 | + |
| 21 | +### Build Offline Documentation |
| 22 | + |
| 23 | +```sh |
| 24 | +echarts-offline-doc --build |
| 25 | +# Equivalent to: |
| 26 | +echarts-offline-doc -b |
| 27 | + |
| 28 | +# If it's slow to clone the echarts-doc repo |
| 29 | +# you can specify a proxy URL |
| 30 | +echarts-offline-doc --build --proxy https://hub.fgit.gq/apache/echarts-doc |
| 31 | +# Equivalent to: |
| 32 | +echarts-offline-doc -b -p https://hub.fgit.gq/apache/echarts-doc |
| 33 | + |
| 34 | +# If it's slow to install dependencies |
| 35 | +# you can optionally use `cnpm` |
| 36 | +echarts-offline-doc --build --cnpm |
| 37 | +# Equivalent to: |
| 38 | +echarts-offline-doc -b -c |
| 39 | + |
| 40 | +# View Help |
| 41 | +echarts-offline-doc --help |
| 42 | +# Equivalent to: |
| 43 | +echarts-offline-doc -h |
| 44 | +``` |
| 45 | + |
| 46 | +### View Offline Documentation With an HTTP Server |
| 47 | + |
| 48 | +```sh |
| 49 | +echarts-offline-doc |
| 50 | +# Equivalent to: |
| 51 | +echarts-offline-doc --serve |
| 52 | +# Equivalent to: |
| 53 | +echarts-offline-doc -s |
| 54 | +``` |
| 55 | + |
| 56 | +### View Offline Documentation Locally |
| 57 | + |
| 58 | +```sh |
| 59 | +echarts-offline-doc --local |
| 60 | +# Equivalent to: |
| 61 | +echarts-offline-doc -l |
| 62 | +``` |
| 63 | + |
| 64 | +## Build From Source |
5 | 65 |
|
6 | 66 | ```sh
|
7 | 67 | # clone the repo
|
8 |
| -git clone https://github.com/plainheart/echarts-offline-doc-cli.git --depth=1 |
| 68 | +git clone https://github.com/plainheart/echarts-offline-doc-cli --depth=1 |
9 | 69 |
|
10 | 70 | # install dependencies
|
11 | 71 | npm i
|
12 | 72 |
|
13 | 73 | # build offline documentation
|
14 | 74 | npm run build
|
15 | 75 |
|
16 |
| -# If it's slow to clone the echarts-doc repo or install dependencies |
| 76 | +# If it's slow to clone the echarts-doc repo |
17 | 77 | # you can specify a proxy URL
|
18 |
| -npm run build -- --proxy=https://hub.fgit.gq/apache/echarts-doc |
| 78 | +npm run build -- --proxy https://hub.fgit.gq/apache/echarts-doc |
| 79 | +# Equivalent to: |
| 80 | +npm run build -- -p https://hub.fgit.gq/apache/echarts-doc |
19 | 81 |
|
20 | 82 | # If it's slow to install dependencies
|
21 | 83 | # you can optionally use `cnpm`
|
22 | 84 | npm run build -- --cnpm
|
| 85 | +# Equivalent to: |
| 86 | +npm run build -- -c |
23 | 87 |
|
24 |
| -# start a local server to view the documentation offline |
25 |
| -npm run start:server |
| 88 | +# start an HTTP server to view the documentation offline |
| 89 | +npm start |
| 90 | +# Equivalent to: |
| 91 | +npm run serve |
26 | 92 |
|
27 |
| -# or run the following command to open the static pages without a server |
28 |
| -npm run start |
| 93 | +# or run the following command to open the static pages locally without a server |
| 94 | +npm run local |
29 | 95 | ```
|
30 | 96 |
|
| 97 | +## License |
31 | 98 |
|
| 99 | +MIT © 2021-2023 [plainheart](https://github.com/plainheart). |
0 commit comments