Skip to content

Commit e66be09

Browse files
authored
Merge pull request #473 from rails/npm
Add official support to npm
2 parents 5e49774 + 26c9c77 commit e66be09

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ Require both `jquery` and `jquery_ujs` into your application.js manifest.
4242
//= require jquery_ujs
4343
```
4444

45+
Installation using npm.
46+
------------
47+
48+
Run `npm install --save jquery-ujs` to install the jquery-ujs package.
49+
4550
Installation using Bower
4651
------------
4752

RELEASE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Releasing jquery-ujs
2+
3+
### Releasing to npm
4+
5+
Make sure npm's configuration `sign-git-tag` is set to true.
6+
7+
```
8+
npm config set sign-git-tag true
9+
```
10+
11+
Release it to npm using the [npm version command](https://docs.npmjs.com/cli/version). Like:
12+
13+
```
14+
npm version patch
15+
```
16+
17+
This will:
18+
19+
* Bump a patch version
20+
* Commit the change
21+
* Generate the tag
22+
* Push the commit and the tag to the repository
23+
* Publish the package in https://www.npmjs.com

package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "jquery-ujs",
3+
"version": "1.2.1",
4+
"description": "Unobtrusive scripting adapter for jQuery",
5+
"main": "src/rails.js",
6+
"directories": {
7+
"test": "test"
8+
},
9+
"scripts": {
10+
"test": "echo \"See the wiki: https://github.com/rails/jquery-ujs/wiki/Running-Tests-and-Contributing\" && exit 1",
11+
"postversion": "git push && git push --tags && npm publish"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/rails/jquery-ujs.git"
16+
},
17+
"author": [
18+
"Stephen St. Martin",
19+
"Steve Schwartz"
20+
],
21+
"license": "MIT",
22+
"bugs": {
23+
"url": "https://github.com/rails/jquery-ujs/issues"
24+
},
25+
"homepage": "https://github.com/rails/jquery-ujs#readme",
26+
"dependencies": {
27+
"jquery": ">=1.8.0"
28+
}
29+
}

0 commit comments

Comments
 (0)