Skip to content

Commit

Permalink
Merge pull request #473 from rails/npm
Browse files Browse the repository at this point in the history
Add official support to npm
  • Loading branch information
rafaelfranca authored Aug 16, 2016
2 parents 5e49774 + 26c9c77 commit e66be09
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------

Expand Down
23 changes: 23 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit e66be09

Please sign in to comment.