UNPKG

3.07 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### Dependencies
39 * jQuery >= 1.10
40 * Bootstrap >= 3.1 (CSS only)
41 * [jQuery.extendext](https://github.com/mistic100/jQuery.extendext)
42 * [doT.js >= 1.0.3](http://olado.github.io/doT)
43 * [MomentJS](http://momentjs.com) (optional, for Date/Time validation)
44 * Other Bootstrap/jQuery plugins used by plugins
45
46($.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)
47
48### Browser support
49 * Internet Explorer >= 9
50 * All other recent browsers
51
52
53
54## Build
55
56#### Prerequisites
57
58 * NodeJS + NPM: `apt-get install nodejs-legacy npm`
59 * Ruby Dev: `apt-get install ruby-dev`
60 * Grunt CLI: `npm install -g grunt-cli`
61 * Bower: `npm install -g bower`
62 * SASS: `gem install sass`
63
64#### Run
65
66Install Node and Bower dependencies `npm install & bower install` then run `grunt` in the root directory to generate production files inside `dist`.
67
68#### Options
69
70You can choose which plugins to include with `--plugins` :
71```bash
72# include "sql-support" and "mongodb-support" plugins
73grunt --plugins=sql-support,mongodb-support
74
75# disable all plugins
76grunt --plugins=false
77```
78All plugins are included by default.
79
80You can also include language files with `--languages` :
81```bash
82# include French & Italian translation
83grunt --languages=fr,it
84```
85
86#### Other commands
87
88 * `grunt test` to run jshint/jscs/scsslint and the QUnit test suite.
89 * `grunt serve` to open the example page with automatic build and livereload.
90 * `grunt doc` to generate the documentation.
91
92
93
94## License
95This library is available under the MIT license.
96
97#### Inspirations
98 * [Knockout Query Builder](http://kindohm.github.io/knockout-query-builder/)
99 * [jui_filter_rules](http://www.pontikis.net/labs/jui_filter_rules/)