This repository was archived by the owner on Feb 24, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -51,22 +51,24 @@ function safeReadFileSync(filename,encoding) {
5151function javascript_include_tag ( include ) {
5252 var includeStr = safeReadFileSync ( path . join ( globalOptions . root , '/source/javascripts/' + include + '.inc' ) , 'utf8' ) ;
5353 if ( globalOptions . minify ) {
54- var scripts = [ ] ;
54+ var scripts = { } ;
5555 var includes = includeStr . split ( '\r' ) . join ( ) . split ( '\n' ) ;
5656 for ( var i in includes ) {
5757 var inc = includes [ i ] ;
5858 var elements = inc . split ( '"' ) ;
5959 if ( elements [ 1 ] ) {
6060 if ( elements [ 1 ] == 'text/javascript' ) {
61- scripts . push ( path . join ( globalOptions . root , 'source/javascripts/all_nosearch.js' ) ) ;
61+ let scriptName = path . join ( globalOptions . root , 'source/javascripts/all_nosearch.js' ) ;
62+ scripts [ scriptName ] = fs . readFileSync ( scriptName , 'utf8' ) ;
6263 break ;
6364 }
6465 else {
65- scripts . push ( path . join ( globalOptions . root , elements [ 1 ] ) ) ;
66+ let scriptName = path . join ( globalOptions . root , elements [ 1 ] ) ;
67+ scripts [ scriptName ] = fs . readFileSync ( scriptName , 'utf8' ) ;
6668 }
6769 }
6870 }
69- var bundle = uglify . minify ( scripts ) ;
71+ let bundle = uglify . minify ( scripts ) ;
7072 if ( globalOptions . inline ) {
7173 includeStr = '<script>' + bundle . code + '</script>' ;
7274 }
You can’t perform that action at this time.
0 commit comments