Skip to content

Commit 154d5cd

Browse files
committed
Remove doT.js (Fix #956 Fix #728)
1 parent 317df5c commit 154d5cd

File tree

7 files changed

+267
-265
lines changed

7 files changed

+267
-265
lines changed

build/dist.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const CORE_SASS = [
2828

2929
const STANDALONE_JS = {
3030
'jquery-extendext': 'node_modules/jquery-extendext/jquery-extendext.js',
31-
'dot/doT': 'node_modules/dot/doT.js',
3231
'query-builder': `${DIST}js/query-builder.js`,
3332
};
3433

examples/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ <h3>Output</h3>
116116
<script src="/node_modules/selectize/dist/js/standalone/selectize.js"></script>
117117
<script src="/node_modules/jquery-extendext/jquery-extendext.js"></script>
118118
<script src="/node_modules/sql-parser-mistic/browser/sql-parser.js"></script>
119-
<script src="/node_modules/dot/doT.js"></script>
120119
<script src="/node_modules/interactjs/dist/interact.js"></script>
121120

122121
<script src="/dist/js/query-builder.js"></script>

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
],
1515
"dependencies": {
1616
"bootstrap": "^3.4.1",
17-
"dot": "^1.1.3",
1817
"jquery": "^3.5.1",
1918
"jquery-extendext": "^1.0.0",
2019
"moment": "^2.29.1",

src/.wrapper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
(function(root, factory) {
22
if (typeof define == 'function' && define.amd) {
3-
define(['jquery', 'dot/doT', 'jquery-extendext'], factory);
3+
define(['jquery', 'jquery-extendext'], factory);
44
}
55
else if (typeof module === 'object' && module.exports) {
6-
module.exports = factory(require('jquery'), require('dot/doT'), require('jquery-extendext'));
6+
module.exports = factory(require('jquery'), require('jquery-extendext'));
77
}
88
else {
9-
factory(root.jQuery, root.doT);
9+
factory(root.jQuery);
1010
}
11-
}(this, function($, doT) {
11+
}(this, function($) {
1212
"use strict";
1313

1414
@@js

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ var QueryBuilder = function($el, options) {
121121
if (!this.templates[tpl]) {
122122
this.templates[tpl] = QueryBuilder.templates[tpl];
123123
}
124-
if (typeof this.templates[tpl] == 'string') {
125-
this.templates[tpl] = doT.template(this.templates[tpl]);
124+
if (typeof this.templates[tpl] !== 'function') {
125+
throw new Error(`Template ${tpl} must be a function`);
126126
}
127127
}, this);
128128

0 commit comments

Comments
 (0)