Skip to content

Commit

Permalink
Merge pull request #1878 from selectize/integrate-deps
Browse files Browse the repository at this point in the history
Integrate deps
  • Loading branch information
risadams authored Oct 2, 2022
2 parents 7567643 + 517124f commit eb62c8a
Show file tree
Hide file tree
Showing 9 changed files with 1,372 additions and 204 deletions.
20 changes: 1 addition & 19 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,13 @@ module.exports = function (grunt) {
);

grunt.registerTask("build_standalone", "", function () {
var files,
i,
n,
var
source,
name,
path,
modules = [];

// amd definitions must be changed to be not anonymous
// @see https://github.com/brianreavis/selectize.js/issues/89
files = [];
for (i = 0, n = files_js_dependencies.length; i < n; i++) {
path = files_js_dependencies[i];
name = path.match(/([^\/]+?).js$/)[1];
source = grunt.file
.read(path)
.replace("define(factory);", "define('" + name + "', factory);");
modules.push(source);
}

path = "dist/js/selectize.js";
source = grunt.file
.read(path)
Expand All @@ -97,11 +84,6 @@ module.exports = function (grunt) {
"src/selectize.jquery.js",
];

var files_js_dependencies = [
"node_modules/@selectize/sifter/sifter.js",
"node_modules/microplugin/src/microplugin.js",
];

var less_imports = [];
var less_plugin_files = [];
var scss_plugin_files = [];
Expand Down
159 changes: 3 additions & 156 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
"type": "git",
"url": "git://github.com/selectize/selectize.js.git"
},
"dependencies": {
"@selectize/sifter": "^0.6.2",
"microplugin": "0.0.3"
},
"devDependencies": {
"@types/jquery": "^3.5.14",
"bootstrap-sass": "^3.4.3",
Expand Down
24 changes: 12 additions & 12 deletions src/.wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
/*jshint curly:false */
/*jshint browser:true */

(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery','sifter','microplugin'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(require('jquery'), require('sifter'), require('microplugin'));
} else {
root.Selectize = factory(root.jQuery, root.Sifter, root.MicroPlugin);
}
}(this, function($, Sifter, MicroPlugin) {
'use strict';
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(require('jquery'));
} else {
root.Selectize = factory(root.jQuery);
}
}(this, function ($) {
'use strict';

@@js
@@js

return Selectize;
return Selectize;
}));
Loading

0 comments on commit eb62c8a

Please sign in to comment.