Skip to content

Commit

Permalink
tweak2
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Dec 1, 2015
1 parent 52be226 commit 3b79bae
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .idea/encodings.xml

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

4 changes: 1 addition & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ module.exports = function (grunt) {
igv: {
src: [
'js/**/*.js',
'!js/shim.js',
'vendor/inflate.js',
'vendor/zlib_and_gzip.min.js',
'vendor/jquery.mousewheel.js',
'js/shim.js'
'vendor/jquery.mousewheel.js'
],
dest: 'dist/igv.js'
}
Expand Down
26 changes: 22 additions & 4 deletions js/shim.js → js/requireShim.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,30 @@
*/

/**
* Self evalutating function that returns the global igv object, creating it if neccessary. This file should be
* concatenated last when building "igv.js". Purpose is to support shims in require.js.
* Self evalutating function that returns the global igv object, creating it if neccessary.
* Purpose is to support shims in require.js and browserify.
*
*/
var igv = (function (igv) {
(function igvForAMD() {


if ( typeof define === 'function' && define.amd ) {

// AMD. Register as an anonymous module.

define(['igv'], igv);

} else if (typeof exports === 'object') {

// Node/CommonJS style for Browserify

module.exports = igv;

}


})(function (igv){

return igv;

})(igv || {});
});

0 comments on commit 3b79bae

Please sign in to comment.