From baccefdb5674d0d8964f3c93f5265a7d2db3a601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 3 Aug 2016 04:59:25 -0300 Subject: [PATCH 1/2] Add package.json to release jquery-ujs in npm. --- package.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 00000000..fcebfa56 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "jquery-ujs", + "version": "1.2.1", + "description": "Unobtrusive scripting adapter for jQuery", + "main": "src/rails.js", + "directories": { + "test": "test" + }, + "scripts": { + "test": "echo \"See the wiki: https://github.com/rails/jquery-ujs/wiki/Running-Tests-and-Contributing\" && exit 1", + "postversion": "git push && git push --tags && npm publish" + }, + "repository": { + "type": "git", + "url": "https://github.com/rails/jquery-ujs.git" + }, + "author": [ + "Stephen St. Martin", + "Steve Schwartz" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/rails/jquery-ujs/issues" + }, + "homepage": "https://github.com/rails/jquery-ujs#readme", + "dependencies": { + "jquery": ">=1.8.0" + } +} From 26c9c77fb6f769fbfd7d321319c5780be2f90872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 3 Aug 2016 05:23:39 -0300 Subject: [PATCH 2/2] Add instructions about npm --- README.md | 5 +++++ RELEASE.md | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 RELEASE.md diff --git a/README.md b/README.md index a9fd2ab4..df6aee68 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,11 @@ Require both `jquery` and `jquery_ujs` into your application.js manifest. //= require jquery_ujs ``` +Installation using npm. +------------ + +Run `npm install --save jquery-ujs` to install the jquery-ujs package. + Installation using Bower ------------ diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..59316f77 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,23 @@ +## Releasing jquery-ujs + +### Releasing to npm + +Make sure npm's configuration `sign-git-tag` is set to true. + +``` +npm config set sign-git-tag true +``` + +Release it to npm using the [npm version command](https://docs.npmjs.com/cli/version). Like: + +``` +npm version patch +``` + +This will: + +* Bump a patch version +* Commit the change +* Generate the tag +* Push the commit and the tag to the repository +* Publish the package in https://www.npmjs.com