提交 5292cdf5 编写于 作者: J Javan Makhmali 提交者: Rafael Mendonça França

Merge pull request #31880 from rmacklin/publish-activestorage-source-in-addition-to-compiled-js

Include source code in published activestorage npm package
上级 1816d4b8
.byebug_history .byebug_history
node_modules node_modules
src
test/dummy/db/*.sqlite3 test/dummy/db/*.sqlite3
test/dummy/db/*.sqlite3-journal test/dummy/db/*.sqlite3-journal
test/dummy/log/*.log test/dummy/log/*.log
......
## Rails 5.2.0.rc1 (January 30, 2018) ## ## Rails 5.2.0.rc1 (January 30, 2018) ##
* Add source code to published npm package
This allows activestorage users to depend on the javascript source code
rather than the compiled code, which can produce smaller javascript bundles.
*Richard Macklin*
* Preserve display aspect ratio when extracting width and height from videos * Preserve display aspect ratio when extracting width and height from videos
with rectangular samples in `ActiveStorage::Analyzer::VideoAnalyzer`. with rectangular samples in `ActiveStorage::Analyzer::VideoAnalyzer`.
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
"description": "Attach cloud and local files in Rails applications", "description": "Attach cloud and local files in Rails applications",
"main": "app/assets/javascripts/activestorage.js", "main": "app/assets/javascripts/activestorage.js",
"files": [ "files": [
"app/assets/javascripts/*.js" "app/assets/javascripts/*.js",
"src/*.js"
], ],
"homepage": "http://rubyonrails.org/", "homepage": "http://rubyonrails.org/",
"repository": { "repository": {
...@@ -16,18 +17,21 @@ ...@@ -16,18 +17,21 @@
}, },
"author": "Javan Makhmali <javan@javan.us>", "author": "Javan Makhmali <javan@javan.us>",
"license": "MIT", "license": "MIT",
"dependencies": {
"spark-md5": "^3.0.0"
},
"devDependencies": { "devDependencies": {
"babel-core": "^6.25.0", "babel-core": "^6.25.0",
"babel-loader": "^7.1.1", "babel-loader": "^7.1.1",
"babel-preset-env": "^1.6.0", "babel-preset-env": "^1.6.0",
"eslint": "^4.3.0", "eslint": "^4.3.0",
"eslint-plugin-import": "^2.7.0", "eslint-plugin-import": "^2.7.0",
"spark-md5": "^3.0.0",
"webpack": "^3.4.0" "webpack": "^3.4.0"
}, },
"scripts": { "scripts": {
"prebuild": "yarn lint", "prebuild": "yarn lint",
"build": "webpack -p", "build": "webpack -p",
"lint": "eslint app/javascript" "lint": "eslint app/javascript",
"prepublishOnly": "rm -rf src && cp -R app/javascript/activestorage src"
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册