a8m / angular-filter

Bunch of useful filters for AngularJS (with no external dependencies!)
https://github.com/a8m/angular-filter
MIT License
2.93k stars 332 forks source link

Use whitelist for files to publish (npm) #227

Closed Den-dp closed 7 years ago

Den-dp commented 7 years ago

In order ro get smaller npm package size I suggesting you to use whitelistening and include only compiled files and maybe the source code.

This can be simply done with https://docs.npmjs.com/files/package.json#files section, so files like

bower.json 
.bowerrc
.npmignore
.travis.yml
Gruntfile.js

will not be published next time

+  "files": [
+    "dist/*.js",
+    "src"
+  ],

And here is how this 4 simple lines will work with publishing

$ npm pack
angular-filter-0.5.11.tgz
$ tar -tf angular-filter-0.5.11.tgz
package/package.json
package/README.md
package/index.js
package/dist/angular-filter.js
package/dist/angular-filter.min.js
package/dist/angular-filter.zip
package/license.md
package/src/_common.js
package/src/filters.js
package/src/_filter/boolean/angular.js
package/src/_filter/boolean/conditions.js
package/src/_filter/boolean/is-null.js
package/src/_filter/collection/after-where.js
package/src/_filter/collection/flatten.js
package/src/_filter/collection/fuzzy-by.js
package/src/_filter/collection/fuzzy.js
package/src/_filter/collection/first.js
package/src/_filter/collection/is-empty.js
package/src/_filter/collection/join.js
package/src/_filter/collection/last.js
package/src/_filter/collection/map.js
package/src/_filter/collection/omit.js
package/src/_filter/collection/filter-by.js
package/src/_filter/collection/pick.js
package/src/_filter/collection/every.js
package/src/_filter/collection/range.js
package/src/_filter/collection/defaults.js
package/src/_filter/collection/remove-with.js
package/src/_filter/collection/count-by.js
package/src/_filter/collection/remove.js
package/src/_filter/collection/contains.js
package/src/_filter/collection/reverse.js
package/src/_filter/collection/concat.js
package/src/_filter/collection/search-field.js
package/src/_filter/collection/chunk-by.js
package/src/_filter/collection/to-array.js
package/src/_filter/collection/before.js
package/src/_filter/collection/unique.js
package/src/_filter/collection/before-where.js
package/src/_filter/collection/where.js
package/src/_filter/collection/after.js
package/src/_filter/collection/xor.js
package/src/_filter/collection/group-by.js
package/src/_filter/math/byte-fmt.js
package/src/_filter/math/kb-fmt.js
package/src/_filter/math/math.js
package/src/_filter/math/max.js
package/src/_filter/math/degrees.js
package/src/_filter/math/percent.js
package/src/_filter/math/radians.js
package/src/_filter/math/radix.js
package/src/_filter/math/short-fmt.js
package/src/_filter/math/sum.js
package/src/_filter/math/min.js
package/src/_filter/string/ends-with.js
package/src/_filter/string/rtrim.js
package/src/_filter/string/slugify.js
package/src/_filter/string/starts-with.js
package/src/_filter/string/repeat.js
package/src/_filter/string/strip-tags.js
package/src/_filter/string/test.js
package/src/_filter/string/trim.js
package/src/_filter/string/truncate.js
package/src/_filter/string/ucfirst.js
package/src/_filter/string/match.js
package/src/_filter/string/uri-component-encode.js
package/src/_filter/string/ltrim.js
package/src/_filter/string/uri-encode.js
package/src/_filter/string/latinize.js
package/src/_filter/string/wrap.js
package/src/_filter/string/stringular.js
package/src/_provider/watcher.js

Thanks

a8m commented 7 years ago

Thanks @Den-dp