Skip to content

Commit 22abf04

Browse files
committed
add shell script style guides
1 parent 2cce677 commit 22abf04

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,45 +77,45 @@ There are two kinds of plotly.js partial bundles:
7777
2. Custom bundles you can create yourself, if none of the distributed packages meet your needs.
7878

7979
Use the `traces` option to include just the trace types you need.
80-
```
80+
```sh
8181
npm run partial-bundle -- --traces scatter,scattergl,scatter3d
8282
```
8383
Please note that the `scatter` trace is currently included in all bundles and cannot be removed.
8484
[This behaviour may change in the future](https://github.com/plotly/plotly.js/pull/5535), so we recommend that you explicitly include `scatter` anyway if you need it in your bundle.
8585

8686
By default all transforms are included in the bundle.
8787
Use the `transforms` option to specify which should be included.
88-
```
88+
```sh
8989
npm run partial-bundle -- --transforms sort,filter
9090
```
9191

9292
Or use `transforms none` to exclude them all.
93-
```
93+
```sh
9494
npm run partial-bundle -- --transforms none
9595
```
9696

9797
Use the `out` option to change the bundle filename (default `custom`).
9898
The new bundle will be created in the `dist/` directory and named `plotly-<out>.min.js` or `plotly-<out>.js` if unminified.
99-
```
99+
```sh
100100
npm run partial-bundle -- --out myBundleName
101101
```
102102

103103
Use the `unminified` option to disable compression.
104-
```
104+
```sh
105105
npm run partial-bundle -- --unminified
106106
```
107107

108108
### Example illustrating use of different options together
109109
To create an unminified custom bundle named `myScatters` including `scatter`, `scattergl` and `scatter3d` traces without any transforms:
110-
```
110+
```sh
111111
npm run partial-bundle -- \
112112
--unminified \
113113
--out myScatters \
114114
--traces scatter,scattergl,scatter3d \
115115
--transforms none
116116
```
117117
Or simply on one line:
118-
```
118+
```sh
119119
npm run partial-bundle -- --unminified --out myScatters --traces scatter,scattergl,scatter3d --transforms none
120120
```
121121

0 commit comments

Comments
 (0)