Skip to content

Commit

Permalink
#746 added gzip assets
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpen committed Apr 11, 2019
1 parent da9b3a9 commit 84e72b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/grunt/createHTMLFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var getStringMap = require( '../../../chipper/js/grunt/getStringMap' );
var getThirdPartyLibEntries = require( '../../../chipper/js/grunt/getThirdPartyLibEntries' );
var ChipperConstants = require( '../../../chipper/js/common/ChipperConstants' );
var ChipperStringUtils = require( '../../../chipper/js/common/ChipperStringUtils' );
var zlib = require( 'zlib' );

/**
* @param grunt - the grunt instance
Expand Down Expand Up @@ -263,7 +264,10 @@ module.exports = function( grunt, buildConfig, dependencies, mipmapsJavaScript,

// Create an _all.html file
if ( grunt.option( 'allHTML' ) && buildConfig.brand === 'phet' ) {
grunt.file.write( 'build/' + buildConfig.name + '_all.html', replaceLocaleConstants( html, 'en', true ) );
var allHTMLFilename = 'build/' + buildConfig.name + '_all.html';
var allHTMLContents = replaceLocaleConstants( html, 'en', true );
grunt.file.write( allHTMLFilename, allHTMLContents );
grunt.file.write( allHTMLFilename + '.gz', zlib.gzipSync( allHTMLContents ) );
}

//TODO should this be using ChipperConstants.FALLBACK_LOCALE instead of hardcoded to 'en'?
Expand Down

0 comments on commit 84e72b2

Please sign in to comment.