Skip to content

Commit aee7b9f

Browse files
committed
Use only NPM
1 parent bd507c4 commit aee7b9f

File tree

11 files changed

+89
-90
lines changed

11 files changed

+89
-90
lines changed

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
build
33
composer.json
44
Gruntfile.js
5-
bower_components
5+
tests/

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
language: node_js
22
node_js:
3-
- "5"
3+
- "8"
44
before_install:
55
- npm install -g grunt-cli
6-
- npm install -g bower
7-
before_script:
8-
- bower install
96
after_success: grunt coveralls

Gruntfile.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ module.exports = function(grunt) {
2727
'src/jquery.js'
2828
],
2929
js_files_for_standalone: [
30-
'bower_components/jquery-extendext/jQuery.extendext.js',
31-
'bower_components/doT/doT.js',
30+
'node_modules/jquery-extendext/jQuery.extendext.js',
31+
'node_modules/dot/doT.js',
3232
'dist/js/query-builder.js'
3333
]
3434
});
@@ -57,6 +57,11 @@ module.exports = function(grunt) {
5757
port: 9000,
5858
livereload: true
5959
}
60+
},
61+
test: {
62+
options: {
63+
port: 9001
64+
}
6065
}
6166
},
6267

@@ -346,7 +351,7 @@ module.exports = function(grunt) {
346351
qunit: {
347352
all: {
348353
options: {
349-
urls: ['tests/index.html?coverage=true'],
354+
urls: ['http://localhost:<%= connect.test.options.port %>/tests/index.html?coverage=true'],
350355
noGlobals: true
351356
}
352357
}
@@ -360,7 +365,8 @@ module.exports = function(grunt) {
360365
src: ['src/*.js', 'src/plugins/**/plugin.js']
361366
}],
362367
options: {
363-
dest: '.coverage-results/all.lcov'
368+
dest: '.coverage-results/all.lcov',
369+
prefix: 'http://localhost:<%= connect.test.options.port %>/'
364370
}
365371
}
366372
},
@@ -414,6 +420,7 @@ module.exports = function(grunt) {
414420
'build_css',
415421
'injector:testSrc',
416422
'injector:testModules',
423+
'connect:test',
417424
'qunit_blanket_lcov',
418425
'qunit'
419426
]);
@@ -423,7 +430,7 @@ module.exports = function(grunt) {
423430
'build_css',
424431
'injector:example',
425432
'open',
426-
'connect',
433+
'connect:dev',
427434
'watch'
428435
]);
429436

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ jQuery-QueryBuilder is available on [jsDelivr](https://www.jsdelivr.com/package/
4242
* jQuery >= 1.10
4343
* Bootstrap >= 3.1 (CSS only)
4444
* [jQuery.extendext](https://github.com/mistic100/jQuery.extendext)
45-
* [doT.js >= 1.0.3](http://olado.github.io/doT)
45+
* [doT.js](http://olado.github.io/doT)
4646
* [MomentJS](http://momentjs.com) (optional, for Date/Time validation)
47+
* [SQL Parser](https://github.com/mistic100/sql-parser) (option, for SQL methods)
4748
* Other Bootstrap/jQuery plugins used by plugins
4849

4950
($.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)
@@ -60,11 +61,10 @@ jQuery-QueryBuilder is available on [jsDelivr](https://www.jsdelivr.com/package/
6061

6162
* NodeJS + NPM: `apt-get install nodejs-legacy npm`
6263
* Grunt CLI: `npm install -g grunt-cli`
63-
* Bower: `npm install -g bower`
6464

6565
#### Run
6666

67-
Install Node and Bower dependencies `npm install & bower install` then run `grunt` in the root directory to generate production files inside `dist`.
67+
Install Node and Bower dependencies `npm install` then run `grunt` in the root directory to generate production files inside `dist`.
6868

6969
#### Options
7070

bower.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,12 @@
1313
"dist/css/query-builder.default.css"
1414
],
1515
"dependencies": {
16-
"jquery": ">=1.9.0",
16+
"jquery": ">=1.10.0",
1717
"bootstrap": ">=3.1.0 <4",
1818
"moment": ">=2.6.0",
1919
"jquery-extendext": ">=0.1.2",
2020
"doT": ">=1.0.3"
2121
},
22-
"devDependencies": {
23-
"blanket": "^1.1.0",
24-
"qunit": "^1.23.0",
25-
"bootstrap-select": "^1.10.0",
26-
"bootbox": "^4.4.0",
27-
"awesome-bootstrap-checkbox": "^0.3.0",
28-
"sql-parser": "^1.1.0",
29-
"bind-polyfill": "~1.0.0",
30-
"interact": "^1.3.2",
31-
"chosen": "^1.8.3"
32-
},
3322
"keywords": [
3423
"jquery",
3524
"query",

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"description": "jQuery plugin for user friendly query/filter creator",
1010
"require": {
1111
"robloach/component-installer": "*",
12-
"components/jquery": ">=1.9.0",
12+
"components/jquery": ">=1.10.0",
1313
"moment/moment": ">=2.6.0",
1414
"components/bootstrap": ">=3.1.0 <4"
1515
},

examples/bower.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/index.html

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
<title>jQuery QueryBuilder Example</title>
88

9-
<link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css" id="bt-theme">
10-
<link rel="stylesheet" href="../bower_components/bootstrap-select/dist/css/bootstrap-select.min.css">
11-
<link rel="stylesheet" href="../bower_components/chosen/chosen.css">
12-
<link rel="stylesheet" href="../bower_components/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css">
13-
<link rel="stylesheet" href="bower_components/seiyria-bootstrap-slider/dist/css/bootstrap-slider.min.css">
14-
<link rel="stylesheet" href="bower_components/selectize/dist/css/selectize.bootstrap3.css">
9+
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" id="bt-theme">
10+
<link rel="stylesheet" href="../node_modules/bootstrap-select/dist/css/bootstrap-select.css">
11+
<link rel="stylesheet" href="../node_modules/chosenjs/chosen.css">
12+
<link rel="stylesheet" href="../node_modules/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css">
13+
<link rel="stylesheet" href="../node_modules/bootstrap-slider/dist/css/bootstrap-slider.css">
14+
<link rel="stylesheet" href="../node_modules/selectize/dist/css/selectize.bootstrap3.css">
1515

1616
<link rel="stylesheet" href="../dist/css/query-builder.default.css" id="qb-theme">
1717
<link rel="stylesheet" href="http://mistic100.github.io/jQuery-QueryBuilder/assets/flags/flags.css">
@@ -36,21 +36,14 @@ <h1>jQuery QueryBuilder
3636
</h1>
3737
</div>
3838

39-
<div class="alert alert-info alert-dismissible" role="alert">
40-
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
41-
<span aria-hidden="true">&times;</span>
42-
</button>
43-
You must execute <code>bower install</code> in the example directory to run this demo.
44-
</div>
45-
4639
<div class="well well-sm">
4740
<label>Theme:</label>
4841
<div class="btn-group">
49-
<button class="btn btn-primary btn-sm change-theme" data-qb="../dist/css/query-builder.default.min.css"
50-
data-bt="../bower_components/bootstrap/dist/css/bootstrap.min.css">Default
42+
<button class="btn btn-primary btn-sm change-theme" data-qb="../dist/css/query-builder.default.css"
43+
data-bt="../node_modules/bootstrap/dist/css/bootstrap.css">Default
5144
</button>
52-
<button class="btn btn-primary btn-sm change-theme" data-qb="../dist/css/query-builder.dark.min.css"
53-
data-bt="bower_components/bootswatch-dist/css/bootstrap.min.css">Dark
45+
<button class="btn btn-primary btn-sm change-theme" data-qb="../dist/css/query-builder.dark.css"
46+
data-bt="../node_modules/bootswatch-dist/css/bootstrap.css">Dark
5447
</button>
5548
</div>
5649

@@ -114,17 +107,17 @@ <h3>Output</h3>
114107
</div>
115108
</div>
116109

117-
<script src="../bower_components/jquery/dist/jquery.js"></script>
118-
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
119-
<script src="../bower_components/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
120-
<script src="../bower_components/chosen/chosen.jquery.js"></script>
121-
<script src="../bower_components/bootbox/bootbox.js"></script>
122-
<script src="bower_components/seiyria-bootstrap-slider/dist/bootstrap-slider.min.js"></script>
123-
<script src="bower_components/selectize/dist/js/standalone/selectize.min.js"></script>
124-
<script src="../bower_components/jquery-extendext/jQuery.extendext.min.js"></script>
125-
<script src="../bower_components/sql-parser/browser/sql-parser.js"></script>
126-
<script src="../bower_components/doT/doT.js"></script>
127-
<script src="../bower_components/interact/dist/interact.js"></script>
110+
<script src="../node_modules/jquery/dist/jquery.js"></script>
111+
<script src="../node_modules/bootstrap/dist/js/bootstrap.js"></script>
112+
<script src="../node_modules/bootstrap-select/dist/js/bootstrap-select.js"></script>
113+
<script src="../node_modules/chosenjs/chosen.jquery.js"></script>
114+
<script src="../node_modules/bootbox/bootbox.js"></script>
115+
<script src="../node_modules/bootstrap-slider/dist/bootstrap-slider.js"></script>
116+
<script src="../node_modules/selectize/dist/js/standalone/selectize.js"></script>
117+
<script src="../node_modules/jquery-extendext/jQuery.extendext.js"></script>
118+
<script src="../node_modules/sql-parser-mistic/browser/sql-parser.js"></script>
119+
<script src="../node_modules/dot/doT.js"></script>
120+
<script src="../node_modules/interactjs/dist/interact.js"></script>
128121

129122
<!-- <script src="../dist/js/query-builder.js"></script> -->
130123
<!-- injector:js -->

package.json

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,48 @@
99
"description": "jQuery plugin for user friendly query/filter creator",
1010
"main": "dist/js/query-builder.js",
1111
"dependencies": {
12-
"jquery": ">=1.9.0",
1312
"bootstrap": ">=3.1.0 <4",
14-
"moment": ">=2.6.0",
13+
"dot": ">=1.0.3",
14+
"jquery": "^3.3.1",
1515
"jquery-extendext": ">=0.1.2",
16-
"dot": ">=1.0.3"
16+
"moment": "^2.21.0"
1717
},
1818
"devDependencies": {
19+
"awesome-bootstrap-checkbox": "^0.3.7",
20+
"blanket": "^1.2.3",
21+
"bootbox": "^4.4.0",
22+
"bootstrap-select": "^1.12.4",
23+
"bootstrap-slider": "^10.0.0",
24+
"bootswatch-dist": "git+https://github.com/dbtek/bootswatch-dist.git#slate",
25+
"chosenjs": "^1.4.3",
1926
"deepmerge": "^0.2.0",
2027
"foodoc": "^0.0.8",
21-
"grunt": "^1.0.0",
28+
"grunt": "^1.0.2",
2229
"grunt-banner": "^0.6.0",
2330
"grunt-contrib-clean": "^1.0.0",
2431
"grunt-contrib-concat": "^1.0.0",
2532
"grunt-contrib-connect": "^1.0.0",
2633
"grunt-contrib-copy": "^1.0.0",
2734
"grunt-contrib-cssmin": "^1.0.0",
2835
"grunt-contrib-jshint": "^1.0.0",
29-
"grunt-contrib-qunit": "^0.7.0",
36+
"grunt-contrib-qunit": "^2.0.0",
3037
"grunt-contrib-uglify": "^1.0.0",
3138
"grunt-contrib-watch": "^1.0.0",
3239
"grunt-coveralls": "^1.0.0",
3340
"grunt-injector": "^1.1.0",
3441
"grunt-jscs": "^2.8.0",
35-
"grunt-jsdoc": "^2.1.0",
42+
"grunt-jsdoc": "^2.2.1",
3643
"grunt-open": "^0.2.3",
37-
"grunt-qunit-blanket-lcov": "^0.3.0",
38-
"grunt-sass": "^2.0.0",
44+
"grunt-qunit-blanket-lcov": "^1.0.0",
45+
"grunt-sass": "^2.1.0",
3946
"grunt-sass-injection": "^1.0.3",
4047
"grunt-sass-lint": "^0.2.2",
4148
"grunt-wrap": "^0.3.0",
49+
"interactjs": "^1.3.3",
4250
"jit-grunt": "^0.10.0",
51+
"qunit": "^2.5.1",
52+
"selectize": "^0.12.4",
53+
"sql-parser-mistic": "^1.2.0",
4354
"time-grunt": "^1.3.0"
4455
},
4556
"keywords": [

tests/common.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ QUnit.assert.rulesMatch = function(actual, expected, message) {
104104
return ok;
105105
}(actual, expected));
106106

107-
this.push(ok, actual, expected, message);
107+
this.pushResult({
108+
result: ok,
109+
actual: actual,
110+
expected: expected,
111+
message: message
112+
});
108113
};
109114

110115
/**
@@ -158,7 +163,12 @@ QUnit.assert.optionsMatch = function($target, expected, message) {
158163
* Custom assert to test a regex
159164
*/
160165
QUnit.assert.match = function(actual, regex, message) {
161-
this.push(regex.test(actual), actual, regex, message);
166+
this.pushResult({
167+
result: regex.test(actual),
168+
actual: actual,
169+
expected: regex,
170+
message: message
171+
});
162172
};
163173

164174

tests/index.html

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<title>jQuery-QueryBuilder</title>
55
<meta charset="utf-8">
66

7-
<link rel="stylesheet" href="../bower_components/qunit/qunit/qunit.css">
8-
<link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">
9-
<link rel="stylesheet" href="../bower_components/bootstrap-select/dist/css/bootstrap-select.min.css">
10-
<link rel="stylesheet" href="../bower_components/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css">
11-
<link rel="stylesheet" href="../bower_components/chosen/chosen.css">
7+
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
8+
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css">
9+
<link rel="stylesheet" href="../node_modules/bootstrap-select/dist/css/bootstrap-select.css">
10+
<link rel="stylesheet" href="../node_modules/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css">
11+
<link rel="stylesheet" href="../node_modules/chosenjs/chosen.css">
1212

1313
<style>
1414
#qunit-modulefilter-container { float:none; }
@@ -17,19 +17,19 @@
1717

1818
<link rel="stylesheet" href="../dist/css/query-builder.default.css">
1919

20-
<script src="../bower_components/bind-polyfill/index.js"></script>
21-
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
22-
<script src="../bower_components/qunit/qunit/qunit.js"></script>
23-
<script src="../bower_components/blanket/dist/qunit/blanket.min.js"></script>
24-
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
25-
<script src="../bower_components/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
26-
<script src="../bower_components/chosen/chosen.jquery.js"></script>
27-
<script src="../bower_components/bootbox/bootbox.js"></script>
28-
<script src="../bower_components/moment/min/moment.min.js"></script>
29-
<script src="../bower_components/sql-parser/browser/sql-parser.js"></script>
30-
<script src="../bower_components/jquery-extendext/jQuery.extendext.min.js"></script>
31-
<script src="../bower_components/doT/doT.js"></script>
32-
<script src="../bower_components/interact/dist/interact.js"></script>
20+
<script src="../node_modules/bind-polyfill/index.js"></script>
21+
<script src="../node_modules/jquery/dist/jquery.js"></script>
22+
<script src="../node_modules/qunit/qunit/qunit.js"></script>
23+
<script src="../node_modules/blanket/dist/qunit/blanket.js"></script>
24+
<script src="../node_modules/bootstrap/dist/js/bootstrap.js"></script>
25+
<script src="../node_modules/bootstrap-select/dist/js/bootstrap-select.js"></script>
26+
<script src="../node_modules/chosenjs/chosen.jquery.js"></script>
27+
<script src="../node_modules/bootbox/bootbox.js"></script>
28+
<script src="../node_modules/moment/moment.js"></script>
29+
<script src="../node_modules/sql-parser-mistic/browser/sql-parser.js"></script>
30+
<script src="../node_modules/jquery-extendext/jQuery.extendext.js"></script>
31+
<script src="../node_modules/dot/doT.js"></script>
32+
<script src="../node_modules/interactjs/dist/interact.js"></script>
3333

3434
<script src="common.js"></script>
3535

0 commit comments

Comments
 (0)