|
|
## Clone / Download the source
|
|
|
|
|
|
The Paged.js source code is hosted from [gitlab.pagedmedia.org](https://gitlab.pagedmedia.org/tools/pagedjs/)
|
|
|
|
|
|
```bash
|
|
|
git clone https://gitlab.pagedmedia.org/tools/pagedjs.git
|
|
|
cd pagedjs
|
|
|
git pull
|
|
|
```
|
|
|
|
|
|
A zip of the source is also available at [gitlab.pagedmedia.org/tools/pagedjs/repository/master/archive.zip](https://gitlab.pagedmedia.org/tools/pagedjs/repository/master/archive.zip)
|
|
|
|
|
|
## Install Node.js & NPM
|
|
|
|
|
|
A Node.js version of at least `8` and NPM `6` is suggested to build from the source.
|
|
|
|
|
|
They can be installed from [https://nodejs.org/en/download/](https://nodejs.org/en/download/)
|
|
|
|
|
|
## Install Dependancies via NPM
|
|
|
|
|
|
Once you have cloned the repo you can install the require dependancies via NPM.
|
|
|
|
|
|
```bash
|
|
|
npm install
|
|
|
```
|
|
|
|
|
|
## Starting the a local server
|
|
|
|
|
|
NPM can start a local development server on `http://localhost:9090` via
|
|
|
|
|
|
```bash
|
|
|
npm start
|
|
|
```
|
|
|
|
|
|
The server will build the contents of the `/dist` folder anytime something in `/src` changes, and will tell any open browsers to reload the examples.
|
|
|
|
|
|
To access the examples open [http://localhost:9090](http://localhost:9090)
|
|
|
|
|
|
## Using the local polyfill
|
|
|
|
|
|
To test a local version of the polyfill in an html file add the following script:
|
|
|
|
|
|
```html
|
|
|
<script src="http://localhost:9090/dist/paged.polyfill.js"></script>
|
|
|
```
|
|
|
|
|
|
## Updates
|
|
|
|
|
|
To update your local version of Paged.js to the latest on [gitlab.pagedmedia.org](https://gitlab.pagedmedia.org/tools/pagedjs/) run
|
|
|
|
|
|
```bash
|
|
|
git pull
|
|
|
npm update
|
|
|
``` |
|
|
\ No newline at end of file |