2017-07-27 19:47:03 -04:00
|
|
|
{
|
2019-01-09 08:09:51 -05:00
|
|
|
"name": "@rails/activestorage",
|
2021-12-07 10:52:30 -05:00
|
|
|
"version": "7.1.0-alpha",
|
2017-07-27 19:47:03 -04:00
|
|
|
"description": "Attach cloud and local files in Rails applications",
|
2021-12-03 05:12:04 -05:00
|
|
|
"module": "app/assets/javascripts/activestorage.esm.js",
|
2017-07-27 19:47:03 -04:00
|
|
|
"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
|
|
|
],
|
2019-10-02 06:00:11 -04:00
|
|
|
"homepage": "https://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": {
|
2021-07-28 15:17:13 -04:00
|
|
|
"spark-md5": "^3.0.1"
|
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
|
|
|
},
|
2017-07-27 19:47:03 -04:00
|
|
|
"devDependencies": {
|
2021-07-28 15:17:13 -04:00
|
|
|
"@rollup/plugin-node-resolve": "^11.0.1",
|
|
|
|
"@rollup/plugin-commonjs": "^19.0.1",
|
2017-07-28 11:17:48 -04:00
|
|
|
"eslint": "^4.3.0",
|
2021-07-28 15:17:13 -04:00
|
|
|
"eslint-plugin-import": "^2.23.4",
|
|
|
|
"rollup": "^2.35.1",
|
|
|
|
"rollup-plugin-terser": "^7.0.2"
|
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
|
|
|
}
|
|
|
|
}
|