File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -174,3 +174,5 @@ var GAME_LEVELS = [`
174174
175175if ( typeof module != "undefined" && module . exports && ( typeof window == "undefined" || window . exports != exports ) )
176176 module . exports = GAME_LEVELS ;
177+ if ( typeof global != "undefined" && ! global . GAME_LEVELS )
178+ global . GAME_LEVELS = GAME_LEVELS ;
Original file line number Diff line number Diff line change @@ -95,3 +95,5 @@ const JOURNAL = [
9595// `require('./path/to/jaques_journal.js')` will get you the array.
9696if ( typeof module != "undefined" && module . exports && ( typeof window == "undefined" || window . exports != exports ) )
9797 module . exports = JOURNAL ;
98+ if ( typeof global != "undefined" && ! global . JOURNAL )
99+ global . JOURNAL = JOURNAL ;
Original file line number Diff line number Diff line change 33// load dependency files into the global namespace, so that the
44// examples can run on node.
55
6- module . exports = function ( ) {
7- for ( var i = 0 ; i < arguments . length ; i ++ )
8- ( 1 , eval ) ( require ( "fs" ) . readFileSync ( __dirname + "/../" + arguments [ i ] , "utf8" ) ) ;
9- } ;
6+ module . exports = function ( ... args ) {
7+ for ( let arg of args )
8+ ( 1 , eval ) ( require ( "fs" ) . readFileSync ( __dirname + "/../" + arg , "utf8" ) )
9+ }
Original file line number Diff line number Diff line change @@ -1119,3 +1119,5 @@ const SCRIPTS = [
11191119// `require('./path/to/jaques_journal.js')` will get you the array.
11201120if ( typeof module != "undefined" && module . exports && ( typeof window == "undefined" || window . exports != exports ) )
11211121 module . exports = SCRIPTS ;
1122+ if ( typeof global != "undefined" && ! global . SCRIPTS )
1123+ global . SCRIPTS = SCRIPTS ;
You can’t perform that action at this time.
0 commit comments