提交 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
node_modules
src
test/dummy/db/*.sqlite3
test/dummy/db/*.sqlite3-journal
test/dummy/log/*.log
......
## 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
with rectangular samples in `ActiveStorage::Analyzer::VideoAnalyzer`.
......
......@@ -4,7 +4,8 @@
"description": "Attach cloud and local files in Rails applications",
"main": "app/assets/javascripts/activestorage.js",
"files": [
"app/assets/javascripts/*.js"
"app/assets/javascripts/*.js",
"src/*.js"
],
"homepage": "http://rubyonrails.org/",
"repository": {
......@@ -16,18 +17,21 @@
},
"author": "Javan Makhmali <javan@javan.us>",
"license": "MIT",
"dependencies": {
"spark-md5": "^3.0.0"
},
"devDependencies": {
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-preset-env": "^1.6.0",
"eslint": "^4.3.0",
"eslint-plugin-import": "^2.7.0",
"spark-md5": "^3.0.0",
"webpack": "^3.4.0"
},
"scripts": {
"prebuild": "yarn lint",
"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.
先完成此消息的编辑!
想要评论请 注册