File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ module . exports = {
2+ "parserOptions" : {
3+ "sourceType" : "module"
4+ } ,
5+ "env" : {
6+ "browser" : true ,
7+ "commonjs" : true
8+ } ,
9+ "rules" : {
10+ "curly" : 2 ,
11+ "no-console" : 0 ,
12+ "no-debugger" : 2 ,
13+ "no-alert" : 2 ,
14+ "no-use-before-define" : 0 ,
15+ "no-underscore-dangle" : 0 ,
16+ "no-multi-spaces" : 0 ,
17+ "no-unused-vars" : 1 ,
18+ "semi" : 0 ,
19+ "global-strict" : 0 ,
20+ "wrap-iife" : [ 2 , "inside" ] ,
21+ "quotes" : [ 1 , "double" ] ,
22+ "key-spacing" : 0 ,
23+ "no-trailing-spaces" : 0 ,
24+ "eol-last" : 2
25+ }
26+ } ;
Original file line number Diff line number Diff line change @@ -31,3 +31,5 @@ node_modules
3131
3232# Optional REPL history
3333.node_repl_history
34+ index.js.map
35+ index.js
Original file line number Diff line number Diff line change 1+ .travis.yml
Original file line number Diff line number Diff line change 22 "name" : " load-js" ,
33 "version" : " 2.0.0" ,
44 "description" : " Promise based script loader for the browser using script tags" ,
5- "main" : " index .js" ,
5+ "main" : " src/load-js .js" ,
66 "scripts" : {
7- "test " : " echo \" Error: no test specified \" && exit 1 "
7+ "prepublish " : " pakit src/load-js.js --out index.js --umd loadJS "
88 },
99 "repository" : {
1010 "type" : " git" ,
1515 "bugs" : {
1616 "url" : " https://github.com/MiguelCastillo/load-js/issues"
1717 },
18- "homepage" : " https://github.com/MiguelCastillo/load-js"
18+ "homepage" : " https://github.com/MiguelCastillo/load-js" ,
19+ "devDependencies" : {
20+ "pakit" : " ^0.6.1"
21+ }
1922}
Original file line number Diff line number Diff line change 1- ( function ( global , factory ) {
2- if ( typeof require === "function" && typeof exports === "object" && typeof module === "object" ) {
3- // CommonJS support
4- module . exports = factory ( ) ;
5- } else if ( typeof define === "function" && define . amd ) {
6- // Do AMD support
7- define ( [ "loadJS" ] , factory ) ;
8- } else {
9- // Do browser support
10- global . loadJS = factory ( ) ;
11- }
12- } ) ( this , function ( ) {
1+ function createLoadJS ( ) {
132 var cache = { } ;
143 var head = document . getElementsByTagName ( "head" ) [ 0 ] || document . documentElement ;
154
129118 Promise . all ( items . map ( exec ) ) :
130119 exec ( items ) ;
131120 }
132- } ) ;
121+ }
122+
123+ module . exports = createLoadJS ( ) ;
124+ module . exports . create = createLoadJS ;
You can’t perform that action at this time.
0 commit comments