UNPKG

3.25 kBMarkdownView Raw
1# jQuery QueryBuilder
2
3[![Bower version](https://img.shields.io/bower/v/jQuery-QueryBuilder.svg?style=flat-square)](http://querybuilder.js.org)
4[![npm version](https://img.shields.io/npm/v/jQuery-QueryBuilder.svg?style=flat-square)](https://www.npmjs.com/package/jQuery-QueryBuilder)
5[![CDN](https://img.shields.io/badge/cdn-jsdelivr-%23EB4C36.svg?style=flat-square)](http://www.jsdelivr.com/projects/jquery.query-builder)
6[![Build Status](https://img.shields.io/travis/mistic100/jQuery-QueryBuilder.svg?style=flat-square)](https://travis-ci.org/mistic100/jQuery-QueryBuilder)
7[![Coverage Status](https://img.shields.io/coveralls/mistic100/jQuery-QueryBuilder/master.svg?style=flat-square)](https://coveralls.io/r/mistic100/jQuery-QueryBuilder)
8
9jQuery plugin offering an simple interface to create complex queries.
10
11[![screenshot](https://raw.githubusercontent.com/mistic100/jQuery-QueryBuilder/master/examples/screenshot.png)](http://querybuilder.js.org)
12
13
14
15## Documentation
16[http://querybuilder.js.org](http://querybuilder.js.org)
17
18
19
20## Install
21
22#### Manually
23
24[Download the latest release](https://github.com/mistic100/jQuery-QueryBuilder/releases)
25
26#### With Bower
27
28```bash
29$ bower install jQuery-QueryBuilder
30```
31
32#### With npm
33
34```bash
35$ npm install jQuery-QueryBuilder
36```
37
38#### Via CDN
39
40jQuery-QueryBuilder is available on [jsDelivr](https://cdn.jsdelivr.net/npm/jQuery-QueryBuilder/dist/) and [unpkg](https://unpkg.com/jQuery-QueryBuilder/dist/))
41
42### Dependencies
43 * jQuery >= 1.10
44 * Bootstrap >= 3.1 (CSS only)
45 * [jQuery.extendext](https://github.com/mistic100/jQuery.extendext)
46 * [doT.js >= 1.0.3](http://olado.github.io/doT)
47 * [MomentJS](http://momentjs.com) (optional, for Date/Time validation)
48 * Other Bootstrap/jQuery plugins used by plugins
49
50($.extendext and doT.js are directly included in the [standalone](https://github.com/mistic100/jQuery-QueryBuilder/blob/master/dist/js/query-builder.standalone.js) file)
51
52### Browser support
53 * Internet Explorer >= 9
54 * All other recent browsers
55
56
57
58## Build
59
60#### Prerequisites
61
62 * NodeJS + NPM: `apt-get install nodejs-legacy npm`
63 * Ruby Dev: `apt-get install ruby-dev`
64 * Grunt CLI: `npm install -g grunt-cli`
65 * Bower: `npm install -g bower`
66 * SASS: `gem install sass`
67
68#### Run
69
70Install Node and Bower dependencies `npm install & bower install` then run `grunt` in the root directory to generate production files inside `dist`.
71
72#### Options
73
74You can choose which plugins to include with `--plugins` :
75```bash
76# include "sql-support" and "mongodb-support" plugins
77grunt --plugins=sql-support,mongodb-support
78
79# disable all plugins
80grunt --plugins=false
81```
82All plugins are included by default.
83
84You can also include language files with `--languages` :
85```bash
86# include French & Italian translation
87grunt --languages=fr,it
88```
89
90#### Other commands
91
92 * `grunt test` to run jshint/jscs/scsslint and the QUnit test suite.
93 * `grunt serve` to open the example page with automatic build and livereload.
94 * `grunt doc` to generate the documentation.
95
96
97
98## License
99This library is available under the MIT license.
100
101#### Inspirations
102 * [Knockout Query Builder](http://kindohm.github.io/knockout-query-builder/)
103 * [jui_filter_rules](http://www.pontikis.net/labs/jui_filter_rules/)