Skip to content

Commit

Permalink
Add jQuery dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinchoolur committed Sep 30, 2016
1 parent b2e9c07 commit eba4584
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 15 deletions.
29 changes: 28 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,34 @@ module.exports = function(grunt) {
all: {
options: {
src: 'src/<%= pkg.name %>.js',
dest: 'dist/<%= pkg.name %>.js'
dest: 'dist/<%= pkg.name %>.js',
deps: {
args : ['$'],
'default': ['$'],
amd: {
indent: 6,
items: ['jquery'],
prefix: '\'',
separator: ',\n',
suffix: '\''
},
cjs: {
indent: 6,
items: ['jquery'],
prefix: 'require(\'',
separator: ',\n',
suffix: '\')'
},
global: {
items: ['jQuery'],
},
pipeline: {
indent: 0,
items : ['jquery'],
prefix: '//= require ',
separator: '\n',
}
}
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lg-hash",
"version": "1.0.0",
"version": "1.0.1",
"description": "History(Hash) module for lightgallery.",
"main": [
"dist/lg-hash.min.js"
Expand Down
16 changes: 8 additions & 8 deletions dist/lg-hash.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/*! lg-hash - v1.0.0 - 2016-09-20
/*! lg-hash - v1.0.1 - 2016-09-30
* http://sachinchoolur.github.io/lightGallery
* Copyright (c) 2016 Sachin N; Licensed GPLv3 */

(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module unless amdModuleId is set
define([], function () {
return (factory());
define(['jquery'], function (a0) {
return (factory(a0));
});
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory();
module.exports = factory(require('jquery'));
} else {
factory();
factory(jQuery);
}
}(this, function () {
}(this, function ($) {

(function($, window, document, undefined) {
(function() {

'use strict';

Expand Down Expand Up @@ -87,7 +87,7 @@

$.fn.lightGallery.modules.hash = Hash;

})(jQuery, window, document);
})();


}));
4 changes: 2 additions & 2 deletions dist/lg-hash.min.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lg-hash",
"version": "1.0.0",
"version": "1.0.1",
"description": "History(Hash) module for lightgallery.",
"keywords": [
"gallery",
Expand Down
1 change: 1 addition & 0 deletions src/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"browser": true,
"predef": [
"jQuery",
"$",
"console",
"$f",
"picturefill",
Expand Down
4 changes: 2 additions & 2 deletions src/lg-hash.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function($, window, document, undefined) {
(function() {

'use strict';

Expand Down Expand Up @@ -67,4 +67,4 @@

$.fn.lightGallery.modules.hash = Hash;

})(jQuery, window, document);
})();

0 comments on commit eba4584

Please sign in to comment.