sanctuary-js / sanctuary

:see_no_evil: Refuge from unsafe JavaScript
https://sanctuary.js.org
MIT License
3.04k stars 94 forks source link

dist: add script for generating bundle with dependencies #641

Closed davidchambers closed 4 years ago

davidchambers commented 5 years ago

Closes #613; closes #480; closes #443; closes #442

Should the files be included in the GitHub repository? The npm package? Both?

GitHub repository npm package
dist/bundle.js :question: :question:
dist/bundle.min.js :question: :question:

/cc @loveship00, @mfidemraizer

Avaq commented 5 years ago

I would say that these files should be included in the GitHub repository for automatic distribution through platforms such as JSDelivr. They should be excluded from the npm package, as npm is a code delivery platform that specifically targets environments capable of managing their own dependencies.

Avaq commented 5 years ago

Note that JSDelivr offers minification through its own server. For example, this is the minified version of Fluture as generated by JSDelivr: https://cdn.jsdelivr.net/gh/fluture-js/Fluture@12.0.0-beta.2/dist/bundle.min.js

It's therefore not strictly necessary to include a minified file alongside the regular file.

davidchambers commented 5 years ago

Note that JSDelivr offers minification through its own server.

Cool! I'll remove the UglifyJS dependency.

Avaq commented 5 years ago

Doesn't this also close the following PR's and issues?