Add a minified version of Pjax to NPM #115
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ node_modules/
|
||||
tests/scripts/index.html
|
||||
pjax.js
|
||||
.nyc_output/
|
||||
pjax.min.js
|
||||
|
||||
20
README.md
20
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
|
||||
<script src="https://cdn.jsdelivr.net/npm/pjax@VERSION/pjax.js"></script>
|
||||
```
|
||||
Or the [minified bundle](https://cdn.jsdelivr.net/npm/pjax/pjax.min.js):
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/pjax@VERSION/pjax.min.js"></script>
|
||||
```
|
||||
|
||||
## No dependencies
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user