2017-07-27 19:47:03 -04:00
|
|
|
{
|
2019-01-09 08:09:51 -05:00
|
|
|
"name": "@rails/activestorage",
|
2019-04-24 15:57:14 -04:00
|
|
|
"version": "6.1.0-alpha",
|
2017-07-27 19:47:03 -04:00
|
|
|
"description": "Attach cloud and local files in Rails applications",
|
|
|
|
"main": "app/assets/javascripts/activestorage.js",
|
2017-07-28 11:54:57 -04:00
|
|
|
"files": [
|
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.
2018-02-03 17:20:12 -05:00
|
|
|
"app/assets/javascripts/*.js",
|
|
|
|
"src/*.js"
|
2017-07-28 11:54:57 -04:00
|
|
|
],
|
2017-08-04 19:23:33 -04:00
|
|
|
"homepage": "http://rubyonrails.org/",
|
2017-07-28 11:54:57 -04:00
|
|
|
"repository": {
|
|
|
|
"type": "git",
|
2017-08-04 19:23:33 -04:00
|
|
|
"url": "git+https://github.com/rails/rails.git"
|
2017-07-28 11:54:57 -04:00
|
|
|
},
|
|
|
|
"bugs": {
|
2017-08-04 19:23:33 -04:00
|
|
|
"url": "https://github.com/rails/rails/issues"
|
2017-07-28 11:54:57 -04:00
|
|
|
},
|
2017-07-27 19:47:03 -04:00
|
|
|
"author": "Javan Makhmali <javan@javan.us>",
|
|
|
|
"license": "MIT",
|
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.
2018-02-03 17:20:12 -05:00
|
|
|
"dependencies": {
|
|
|
|
"spark-md5": "^3.0.0"
|
|
|
|
},
|
2017-07-27 19:47:03 -04:00
|
|
|
"devDependencies": {
|
|
|
|
"babel-core": "^6.25.0",
|
2018-04-25 09:46:56 -04:00
|
|
|
"babel-plugin-external-helpers": "^6.22.0",
|
2017-07-27 19:47:03 -04:00
|
|
|
"babel-preset-env": "^1.6.0",
|
2017-07-28 11:17:48 -04:00
|
|
|
"eslint": "^4.3.0",
|
|
|
|
"eslint-plugin-import": "^2.7.0",
|
2018-04-25 09:46:56 -04:00
|
|
|
"rollup": "^0.58.2",
|
|
|
|
"rollup-plugin-babel": "^3.0.4",
|
|
|
|
"rollup-plugin-commonjs": "^9.1.0",
|
|
|
|
"rollup-plugin-node-resolve": "^3.3.0",
|
|
|
|
"rollup-plugin-uglify": "^3.0.0"
|
2017-07-27 19:47:03 -04:00
|
|
|
},
|
|
|
|
"scripts": {
|
2017-07-28 11:17:48 -04:00
|
|
|
"prebuild": "yarn lint",
|
2018-04-25 09:46:56 -04:00
|
|
|
"build": "rollup --config rollup.config.js",
|
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.
2018-02-03 17:20:12 -05:00
|
|
|
"lint": "eslint app/javascript",
|
|
|
|
"prepublishOnly": "rm -rf src && cp -R app/javascript/activestorage src"
|
2017-07-27 19:47:03 -04:00
|
|
|
}
|
|
|
|
}
|