1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-05 16:13:34 +02:00

Updated README

This commit is contained in:
Max Guglielmi 2017-05-13 11:09:21 +10:00
parent 955c49a2c1
commit 4b7af32eb1

View file

@ -32,7 +32,7 @@ git clone https://github.com/koalyptus/TableFilter.git
* You can [download](https://github.com/koalyptus/TableFilter/archive/master.zip) this repository.
* Alternatively, install TableFilter files in your npm enabled project using:
* TableFilter is available on [npm repository](https://www.npmjs.com/package/tablefilter), you can install it from the command line using the following command:
```shell
npm install tablefilter --save-dev
```
@ -40,15 +40,32 @@ npm install tablefilter --save-dev
```shell
npm install tablefilter@next --save-dev
```
* If you don't use `npm`, you can also
[access these files on unpkg](https://unpkg.com/tablefilter/), download them
or point your package manager to them.
* Alternatively you can also [access these files from unpkg CDN](https://unpkg.com/tablefilter/), download them or point your package manager to them.
## Setup
### Using modules
Require `TableFilter`:
```javascript
// ES2015 modules
import TableFilter from 'tablefilter';
// CommonJS or AMD modules
var TableFilter = require('tablefilter');
```
### Using distribution scripts
If you are not using a module system, you can reference the distribution scripts directly in your html pages:
```html
<script src="path_to/node_modules/tablefilter/dist/tablefilter/tablefilter.js"></script>
```
### Placing manually the distribution scripts in your project
Copy the ``tablefilter`` directory under ``dist`` and place it at desired location in your project. Then include the main js file in your page:
```shell
<script src="path/to/my/scripts/tablefilter/tablefilter.js"></script>
```
### Usage
Place the following snippet just under the HTML table and always define a ``base_path`` property in the configuration object to reflect the path to the script
```shell
<script>