Skip to content

Commit

Permalink
Added gzip asset for #746
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpen committed Apr 26, 2019
1 parent 96886a1 commit 2674eb4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions js/grunt/buildRunnable.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const packageXHTML = require( './packageXHTML' );
const reportUnusedMedia = require( './reportUnusedMedia' );
const reportUnusedStrings = require( './reportUnusedStrings' );
const requireBuild = require( './requireBuild' );
const zlib = require( 'zlib' );

/**
* Builds a runnable (e.g. a simulation).
Expand Down Expand Up @@ -187,13 +188,17 @@ module.exports = async function( repo, minifyOptions, instrument, allHTML, brand
includeAllLocales: true,
isDebugBuild: false
}, commonInitializationOptions ) );
grunt.file.write( `${buildDir}/${repo}_all_${brand}.html`, packageRunnable( {

const allHTMLFilename = `${buildDir}/${repo}_all_${brand}.html`;
const allHTMLContents = packageRunnable( {
repo: repo,
stringMap: stringMap,
htmlHeader: htmlHeader,
locale: ChipperConstants.FALLBACK_LOCALE,
scripts: [ initializationScript, splashScript, mipmapsJavaScript, ...productionPreloads, chipperStringsScript, productionJS ]
} ) );
} );
grunt.file.write( allHTMLFilename, allHTMLContents );
grunt.file.write( `${allHTMLFilename}.gz`, zlib.gzipSync( allHTMLContents ) );
}

// Debug build (always included)
Expand Down

0 comments on commit 2674eb4

Please sign in to comment.