Update README (#199)

* Move the npm installation option to last.
* Clarify that index.js is not a bundle
This commit was merged in pull request #199.
This commit is contained in:
BehindTheMath
2019-03-03 01:45:34 -05:00
committed by MoOx
parent c13149626b
commit 493d56c2d0

View File

@@ -14,12 +14,7 @@ _Pjax does not rely on other libraries, like jQuery or similar. It is written en
## Installation ## Installation
- You can install Pjax from **npm**: - You can link directly to the [bundle](https://cdn.jsdelivr.net/npm/pjax/pjax.js):
```shell
npm install pjax
```
- You can also link directly to the [bundle](https://cdn.jsdelivr.net/npm/pjax/pjax.js):
```html ```html
<script src="https://cdn.jsdelivr.net/npm/pjax@VERSION/pjax.js"></script> <script src="https://cdn.jsdelivr.net/npm/pjax@VERSION/pjax.js"></script>
``` ```
@@ -29,6 +24,17 @@ _Pjax does not rely on other libraries, like jQuery or similar. It is written en
<script src="https://cdn.jsdelivr.net/npm/pjax@VERSION/pjax.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/pjax@VERSION/pjax.min.js"></script>
``` ```
- You can also install Pjax from **npm**:
```shell
npm install pjax
```
**Note**: If you use this option, you will need to do one of the following:
- Link a script tag to either `pjax.js` or `pjax.min.js`. E.g.:
```html
<script src="./node_modules/pjax/pjax.js"></script>
```
- Use a bundler like Webpack. (`index.js` cannot be used in the browser without a bundler).
--- ---
## What Pjax Does ## What Pjax Does