Skip to content

Commit

Permalink
Add .npmignore, so we can ignore docs. (#257)
Browse files Browse the repository at this point in the history
Fixes #256

Importantly, this means the `src/` `test/` and `docs/` dirs will not be shipped with chroma-js via npm.

To test, I used this one liner:
```sh
npm pack --silent && tar -xvzf *.tgz | sort && rm -rf package *.tgz
```

Before these changes I got:
```
package/.eslintrc.js
package/.travis.yml
package/CHANGELOG.md
package/chroma.js
package/chroma.min.js
package/chroma-light.js
package/chroma-light.min.js
package/docs/assets/bg.png
package/docs/bin/post-process
package/docs/index.html
package/docs/libs/chroma.js
package/docs/libs/chroma.min.js
package/docs/libs/chroma-light.js
package/docs/libs/chroma-light.min.js
package/docs/libs/codemirror/lib/codemirror.css
package/docs/libs/codemirror/lib/codemirror.js
package/docs/libs/codemirror/mode/javascript/index.html
package/docs/libs/codemirror/mode/javascript/javascript.js
package/docs/libs/codemirror/mode/javascript/json-ld.html
package/docs/libs/codemirror/mode/javascript/test.js
package/docs/libs/codemirror/mode/javascript/typescript.html
package/docs/libs/jquery/jquery-1.11.1.min.js
package/docs/Makefile
package/docs/src/footer.inc.html
package/docs/src/index.css
package/docs/src/index.md
package/index.js
package/index-light.js
package/LICENSE
package/package.json
package/readme.md
package/rollup.config.js
package/src/chroma.js
package/src/Color.js
package/src/colors/colorbrewer.js
package/src/colors/w3cx11.js
package/src/generator/average.js
package/src/generator/bezier.js
package/src/generator/blend.js
package/src/generator/cubehelix.js
package/src/generator/mix.js
package/src/generator/random.js
package/src/generator/scale.js
package/src/interpolator/_hsx.js
package/src/interpolator/hcg.js
package/src/interpolator/hsi.js
package/src/interpolator/hsl.js
package/src/interpolator/hsv.js
package/src/interpolator/index.js
package/src/interpolator/lab.js
package/src/interpolator/lch.js
package/src/interpolator/lrgb.js
package/src/interpolator/num.js
package/src/interpolator/rgb.js
package/src/io/cmyk/cmyk2rgb.js
package/src/io/cmyk/index.js
package/src/io/cmyk/rgb2cmyk.js
package/src/io/css/css2rgb.js
package/src/io/css/hsl2css.js
package/src/io/css/index.js
package/src/io/css/rgb2css.js
package/src/io/delta-e.coffee
package/src/io/distance.coffee
package/src/io/gl/index.js
package/src/io/hcg/hcg2rgb.js
package/src/io/hcg/index.js
package/src/io/hcg/rgb2hcg.js
package/src/io/hex/hex2rgb.js
package/src/io/hex/index.js
package/src/io/hex/rgb2hex.js
package/src/io/hsi/hsi2rgb.js
package/src/io/hsi/index.js
package/src/io/hsi/rgb2hsi.js
package/src/io/hsl/hsl2rgb.js
package/src/io/hsl/index.js
package/src/io/hsl/rgb2hsl.js
package/src/io/hsv/hsv2rgb.js
package/src/io/hsv/index.js
package/src/io/hsv/rgb2hsv.js
package/src/io/input.js
package/src/io/lab/index.js
package/src/io/lab/lab2rgb.js
package/src/io/lab/lab-constants.js
package/src/io/lab/rgb2lab.js
package/src/io/lch/hcl2rgb.js
package/src/io/lch/index.js
package/src/io/lch/lab2lch.js
package/src/io/lch/lch2lab.js
package/src/io/lch/lch2rgb.js
package/src/io/lch/rgb2lch.js
package/src/io/named/index.js
package/src/io/num/index.js
package/src/io/num/num2rgb.js
package/src/io/num/rgb2num.js
package/src/io/rgb/index.js
package/src/io/temp/index.js
package/src/io/temp/rgb2temperature.js
package/src/io/temp/temperature2rgb.js
package/src/ops/alpha.js
package/src/ops/clipped.js
package/src/ops/darken.js
package/src/ops/get.js
package/src/ops/luminance.js
package/src/ops/mix.js
package/src/ops/premultiply.js
package/src/ops/saturate.js
package/src/ops/set.js
package/src/utils/analyze.js
package/src/utils/clip_rgb.js
package/src/utils/contrast.js
package/src/utils/delta-e.js
package/src/utils/distance.js
package/src/utils/index.js
package/src/utils/last.js
package/src/utils/limit.js
package/src/utils/scales.js
package/src/utils/type.js
package/src/utils/unpack.js
package/src/utils/valid.js
package/test/alpha.test.js
package/test/analyze.test.js
package/test/autodetect.test.js
package/test/average.test.js
package/test/bezier.js
package/test/blend.test.js
package/test/cmyk2rgb.test.js
package/test/color.test.js
package/test/contrast.test.js
package/test/converters.test.js
package/test/css2rgb.test.js
package/test/cubehelix.test.js
package/test/docs.test.js
package/test/hcg2rgb.test.js
package/test/hex2rgb.test.js
package/test/hsi2rgb.test.js
package/test/hsl2rgb.test.js
package/test/hsv2rgb.test.js
package/test/html/bezier.html
package/test/html/blend.html
package/test/html/colorscales.html
package/test/html/cubehelix.html
package/test/html/luminance.html
package/test/lab2lch.test.js
package/test/lab2rgb.test.js
package/test/lch.test.js
package/test/lch2lab.test.js
package/test/lch2rgb.test.js
package/test/limits.test.js
package/test/luminance.test.js
package/test/manipulate.test.js
package/test/misc.test.js
package/test/mix.test.js
package/test/num.test.js
package/test/num2rgb.test.js
package/test/random.test.js
package/test/rgb2cmyk.test.js
package/test/rgb2css.test.js
package/test/rgb2hex.test.js
package/test/rgb2hsi.test.js
package/test/rgb2hsv.test.js
package/test/rgb2lab.test.js
package/test/rgb2lch.test.js
package/test/scale.lcorrection.test.js
package/test/scales.test.js
package/test/temperature2rgb.test.js
package/test/unpack.test.js
package/test/valid.test.js
```

After I got:
```
package/CHANGELOG.md
package/chroma.js
package/chroma.min.js
package/chroma-light.js
package/chroma-light.min.js
package/curr
package/index.js
package/index-light.js
package/LICENSE
package/package.json
package/readme.md
```
  • Loading branch information
JakeThurman authored Mar 3, 2021
1 parent 552048f commit 74c9ff5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .gitignore equivelant
.git*
readme (Autosaved).md
m.txt
.DS_Store
license.coffee
node_modules
yarn.lock

# Dev content
test/
src/
docs/
.eslintrc.js
.travis.yml
Gruntfile.js
rollup.config.js

2 comments on commit 74c9ff5

@wereHamster
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JakeThurman tar tf <file> will list files in that tarball, without extracting them. Might be more convenient than extracting them first and then deleting, especially if the tarball is large.

@JakeThurman
Copy link
Contributor Author

@JakeThurman JakeThurman commented on 74c9ff5 Mar 4, 2021 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.