From c0368ad090b79c19300a4aa133bb188b2d9ab611 Mon Sep 17 00:00:00 2001 From: Richard Macklin Date: Sat, 3 Feb 2018 14:20:12 -0800 Subject: 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. --- activestorage/.gitignore | 1 + 1 file changed, 1 insertion(+) (limited to 'activestorage/.gitignore') 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 -- cgit v1.2.3 From 0f98954a83a5ec1d7c8def958422a62f0ead59a1 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Fri, 28 Jul 2017 06:18:43 +0000 Subject: Clean up and consolidate .gitignores * Global ignores at toplevel .gitignore * Component-specific ignores in each toplevel directory * Remove `actionview/test/tmp/.keep` for JRuby ``` rm actionview/test/tmp/ -fr cd actionview/ bundle exec jruby -Itest test/template/digestor_test.rb ``` Related to #11743, #30392. Closes #29978. --- activestorage/.gitignore | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'activestorage/.gitignore') diff --git a/activestorage/.gitignore b/activestorage/.gitignore index 29bdcc4468..3e78878ffc 100644 --- a/activestorage/.gitignore +++ b/activestorage/.gitignore @@ -1,7 +1,6 @@ -.byebug_history -node_modules -src -test/dummy/db/*.sqlite3 -test/dummy/db/*.sqlite3-journal -test/dummy/log/*.log -test/dummy/tmp/ +/src/ +/test/dummy/db/*.sqlite3 +/test/dummy/db/*.sqlite3-journal +/test/dummy/log/*.log +/test/dummy/tmp/ +/test/service/configurations.yml -- cgit v1.2.3