aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/.gitignore
diff options
context:
space:
mode:
authorRichard Macklin <richard.github@nrm.com>2018-02-03 14:20:12 -0800
committerRichard Macklin <richard.github@nrm.com>2018-02-06 08:18:21 -0800
commitc0368ad090b79c19300a4aa133bb188b2d9ab611 (patch)
tree45a58b0cdd69e5f9ab6cb2d3fe9692bda3f9bf7b /activestorage/.gitignore
parentf76c7e860e4d9306052b6a177902171890121648 (diff)
downloadrails-c0368ad090b79c19300a4aa133bb188b2d9ab611.tar.gz
rails-c0368ad090b79c19300a4aa133bb188b2d9ab611.tar.bz2
rails-c0368ad090b79c19300a4aa133bb188b2d9ab611.zip
Include source code in published activestorage npm package
This allows activestorage users to ship smaller javascript bundles to visitors using modern browsers, as demonstrated in this repository: https://github.com/rmacklin/activestorage-es2015-build-example In that example, the bundle shrinks by 5K (24%). In addition to allowing smaller bundles for those who ship untranspiled code to modern browsers, including the source code in the published package can be useful in other ways: 1. Users can import individual modules rather than the whole library 2. As a result of (1), users can also monkey patch parts of activestorage by importing the relevant module, modifying the exported object, and then importing the rest of activestorage (which would then use the patched object). Note: In order to allow the source code to be depended on rather than the compiled code, we have to declare the external dependency on spark-md5 as a regular dependency, not a development dependency. This means that even users who depend on the compiled code will have to download this package. However, spark-md5 is a small package, so this tradeoff seems worth it.
Diffstat (limited to 'activestorage/.gitignore')
-rw-r--r--activestorage/.gitignore1
1 files changed, 1 insertions, 0 deletions
diff --git a/activestorage/.gitignore b/activestorage/.gitignore
index a532335bdd..29bdcc4468 100644
--- a/activestorage/.gitignore
+++ b/activestorage/.gitignore
@@ -1,5 +1,6 @@
.byebug_history
node_modules
+src
test/dummy/db/*.sqlite3
test/dummy/db/*.sqlite3-journal
test/dummy/log/*.log