diff --git a/PUBLISHING-TO-NPM.md b/PUBLISHING-TO-NPM.md new file mode 100644 index 00000000..84a50ce9 --- /dev/null +++ b/PUBLISHING-TO-NPM.md @@ -0,0 +1,20 @@ +# Publishing to npm: + +## Manual Way +```bash + git pull https://github.com/rails/jquery-ujs.git master + vim package.json # updating version number + git commit -am 'the version number' + git push --follow-tags origin master + npm publish +``` + +## release-it +Alternately, I use [release-it](https://github.com/webpro/release-it). Assuming the version is 1.2.1 to publish: + +``` +git pull https://github.com/rails/jquery-ujs.git master +release-it 1.2.1 +``` + +Take the defaults, except answer y to the final question to publish. diff --git a/README.md b/README.md index a9fd2ab4..cef1d5ff 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ +Notes on the npm supporting fork +======================================= +We forked from the official version at https://github.com/rails/jquery-ujs to support npm. + +* Reasons: [rails/jquery-ujs/issues/423](https://github.com/rails/jquery-ujs/issues/423) and + [rails/jquery-ujs/pull/380](https://github.com/rails/jquery-ujs/pull/380) +* We'll do our best to keep the npm version consistent with the version used by jquery-ujs. +* There should be 2 files that differ: Addition of a `package.json` and changes ONLY to the top of the README.md +* For advice on how to use the npm version with Rails and Webpack, see + [shakacode/react-webpack-rails-tutorial/pull/88](https://github.com/shakacode/react-webpack-rails-tutorial/pull/88) and + [forum article on considerations for jquery with Rails and webpack](http://forum.railsonmaui.com/t/considerations-for-jquery-with-rails-and-webpack/344). + Unobtrusive scripting adapter for jQuery ======================================== diff --git a/package.json b/package.json new file mode 100644 index 00000000..bd4292c4 --- /dev/null +++ b/package.json @@ -0,0 +1,27 @@ +{ + "name": "jquery-ujs", + "version": "1.2.1", + "description": "Ruby on Rails unobtrusive scripting adapter for jQuery, for npm", + "main": "src/rails.js", + "scripts": { + "test": "echo \"See the wiki: https://github.com/rails/jquery-ujs/wiki/Running-Tests-and-Contributing\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/shakacode/jquery-ujs.git" + }, + "author": "Stephen St. Martin", + "contributors": [ + "Stephen St. Martin", + "Steve Schwartz", + "Justin Gordon" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/shakacode/jquery-ujs/issues" + }, + "homepage": "https://github.com/shakacode/jquery-ujs", + "dependencies": { + "jquery": ">=1.8.0" + } +}