Skip to content

Commit 601ff0d

Browse files
committed
Finalize jsDoc
1 parent 1da6cc8 commit 601ff0d

26 files changed

Lines changed: 497 additions & 315 deletions

File tree

.jsdoc.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"opts": {
3+
"private": false,
4+
"template": "node_modules/foodoc/template",
5+
"readme": "build/jsdoc.md"
6+
},
7+
"plugins": [
8+
"plugins/markdown"
9+
],
10+
"templates": {
11+
"systemName": "jQuery QueryBuilder API",
12+
"systemSummary": "jQuery plugin for user friendly query/filter creator",
13+
"systemColor": "#004482",
14+
"copyright": "Licensed under MIT License, documentation under CC BY 3.0.",
15+
"includeDate": false,
16+
"inverseNav": false,
17+
"cleverLinks": true,
18+
"sort": "longname, version, since",
19+
"analytics": {
20+
"ua": "UA-28192323-3",
21+
"domain": "auto"
22+
},
23+
"navMembers": [
24+
{"kind": "class", "title": "Classes", "summary": "All documented classes."},
25+
{"kind": "external", "title": "Externals", "summary": "All documented external members."},
26+
{"kind": "global", "title": "Globals", "summary": "All documented globals."},
27+
{"kind": "mixin", "title": "Mixins", "summary": "All documented mixins."},
28+
{"kind": "interface", "title": "Interfaces", "summary": "All documented interfaces."},
29+
{"kind": "module", "title": "Plugins", "summary": "All documented modules."},
30+
{"kind": "event", "title": "Events", "summary": "All documented events."},
31+
{"kind": "namespace", "title": "Namespaces", "summary": "All documented namespaces."},
32+
{"kind": "tutorial", "title": "Tutorials", "summary": "All available tutorials."}
33+
],
34+
"scripts": [
35+
"https://cdnjs.cloudflare.com/ajax/libs/trianglify/1.0.1/trianglify.min.js",
36+
"js/custom.js"
37+
]
38+
}
39+
}

Gruntfile.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ module.exports = function(grunt) {
106106
dest: 'dist/scss/plugins/_' + name + '.scss'
107107
};
108108
})
109+
},
110+
doc_script: {
111+
src: 'build/jsdoc.js',
112+
dest: 'doc/js/custom.js'
109113
}
110114
},
111115

@@ -263,7 +267,8 @@ module.exports = function(grunt) {
263267

264268
// clean build dir
265269
clean: {
266-
temp: ['.temp']
270+
temp: ['.temp'],
271+
doc: ['doc']
267272
},
268273

269274
// jshint tests
@@ -301,11 +306,9 @@ module.exports = function(grunt) {
301306
jsdoc: {
302307
lib: {
303308
src: ['src/**/*.js', '!src/**/.wrapper.js'],
304-
dest: 'doc',
305309
options: {
306-
private: false,
307-
template: 'node_modules/docdash',
308-
readme: 'README.md'
310+
destination: 'doc',
311+
config: '.jsdoc.json'
309312
}
310313
}
311314
},
@@ -423,4 +426,10 @@ module.exports = function(grunt) {
423426
'connect',
424427
'watch'
425428
]);
429+
430+
grunt.registerTask('doc', [
431+
'clean:doc',
432+
'jsdoc',
433+
'copy:doc_script'
434+
]);
426435
};

README.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,39 @@
11
# jQuery QueryBuilder
22

33
[![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)
45
[![CDN](https://img.shields.io/badge/cdn-jsdelivr-%23EB4C36.svg?style=flat-square)](http://www.jsdelivr.com/projects/jquery.query-builder)
56
[![Build Status](https://img.shields.io/travis/mistic100/jQuery-QueryBuilder.svg?style=flat-square)](https://travis-ci.org/mistic100/jQuery-QueryBuilder)
67
[![Coverage Status](https://img.shields.io/coveralls/mistic100/jQuery-QueryBuilder/master.svg?style=flat-square)](https://coveralls.io/r/mistic100/jQuery-QueryBuilder)
7-
[![Say thanks](https://img.shields.io/badge/SayThanks.io-%E2%98%80-1EAEDB.svg?style=flat-square)](https://saythanks.io/to/mistic100)
88

99
jQuery plugin offering an simple interface to create complex queries.
1010

1111
[![screenshot](https://raw.githubusercontent.com/mistic100/jQuery-QueryBuilder/master/examples/screenshot.png)](http://querybuilder.js.org)
1212

13+
14+
1315
## Documentation
14-
[querybuilder.js.org](http://querybuilder.js.org)
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+
```
1537

1638
### Dependencies
1739
* jQuery >= 1.10
@@ -27,7 +49,9 @@ jQuery plugin offering an simple interface to create complex queries.
2749
* Internet Explorer >= 9
2850
* All other recent browsers
2951

30-
### Build
52+
53+
54+
## Build
3155

3256
#### Prerequisites
3357

@@ -63,8 +87,13 @@ grunt --languages=fr,it
6387

6488
* `grunt test` to run jshint/jscs/scsslint and the QUnit test suite.
6589
* `grunt serve` to open the example page with automatic build and livereload.
66-
* `grunt jsdoc` to generate the documentation.
90+
* `grunt doc` to generate the documentation.
91+
92+
93+
94+
## License
95+
This library is available under the MIT license.
6796

68-
### Inspiration
97+
#### Inspirations
6998
* [Knockout Query Builder](http://kindohm.github.io/knockout-query-builder/)
7099
* [jui_filter_rules](http://www.pontikis.net/labs/jui_filter_rules/)

build/jsdoc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(function() {
2+
var header = $('.page-header');
3+
var pattern = Trianglify({
4+
width: window.screen.width | header.outerWidth(),
5+
height: header.outerHeight(),
6+
cell_size: 90,
7+
seed: 'jQuery QueryBuilder',
8+
x_colors: ['#0074d9', '#001224']
9+
});
10+
11+
header.css('background-image', 'url(' + pattern.png() + ')');
12+
}());

build/jsdoc.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# <i class="glyphicon glyphicon-home"></i> [Main documentation](..)
2+
3+
# Entry point: [$.fn.QueryBuilder](external-_jQuery.fn_.html)
4+
5+
## [QueryBuilder](QueryBuilder.html)
6+
7+
## [Rule](Rule.html) & [Group](Group.html)
8+
9+
## [Events](list_event.html)
10+
11+
## [Plugins](list_module.html)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"devDependencies": {
1818
"deepmerge": "^0.2.0",
19-
"docdash": "^0.4.0",
19+
"foodoc": "git://github.com/mistic100/foodoc.git#custom",
2020
"grunt": "^1.0.0",
2121
"grunt-banner": "^0.6.0",
2222
"grunt-contrib-clean": "^1.0.0",

0 commit comments

Comments
 (0)