diff --git a/.gitignore b/.gitignore
index 2128eae..561eeb2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ node_modules/
tests/scripts/index.html
pjax.js
.nyc_output/
+pjax.min.js
diff --git a/README.md b/README.md
index ec01cff..961305d 100644
--- a/README.md
+++ b/README.md
@@ -21,15 +21,19 @@ Especially for user that have low bandwidth connection._
## Installation
-You can install pjax from **npm**
+- You can install pjax from **npm**:
+ ```shell
+ npm install pjax
+ ```
-```shell
-$ npm install pjax
-```
-
-Pjax can obviously be downloaded directly.
-
-[https://unpkg.com/pjax/pjax.js](https://unpkg.com/pjax/pjax.js)
+- You can also link directly to the [bundle](https://cdn.jsdelivr.net/npm/pjax/pjax.js):
+ ```html
+
+ ```
+ Or the [minified bundle](https://cdn.jsdelivr.net/npm/pjax/pjax.min.js):
+ ```html
+
+ ```
## No dependencies
diff --git a/package.json b/package.json
index a317664..e9049c4 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,8 @@
"files": [
"index.js",
"lib",
- "pjax.js"
+ "pjax.js",
+ "pjax.min.js"
],
"devDependencies": {
"browserify": "^15.0.0",
@@ -32,18 +33,20 @@
"serve": "^6.4.4",
"tap-nyc": "^1.0.3",
"tap-spec": "^4.1.1",
- "tape": "^4.8.0"
+ "tape": "^4.8.0",
+ "uglify-js": "^3.3.8"
},
"scripts": {
"lint": "jscs . && jshint . --exclude-path .gitignore",
"standalone": "browserify index.js --standalone Pjax > pjax.js",
+ "build": "npm run standalone && uglifyjs pjax.js -o pjax.min.js",
"build-debug": "browserify index.js --debug --standalone Pjax > pjax.js",
"tests": "tape -r ./tests/setup.js './tests/**/*.js'",
"test": "npm run lint && npm run tests | tap-spec",
"coverage-tests": "npm run tests | tap-nyc",
"coverage": "nyc -x \"tests/**\" npm run coverage-tests",
"example": "opn http://localhost:3000/example/ && serve -p 3000 .",
- "prepublish": "npm run standalone",
+ "prepublish": "npm run build",
"release": "npmpub"
}
}