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 c516c7a commit e81aa7e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions js/grunt/buildRunnable.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

// modules
const _ = require( 'lodash' ); // eslint-disable-line require-statement-match
const _7z = require('7zip-min'); // eslint-disable-line require-statement-match
const assert = require( 'assert' );
const buildMipmaps = require( './buildMipmaps' );
const ChipperConstants = require( '../common/ChipperConstants' );
Expand Down Expand Up @@ -38,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 @@ -199,10 +199,7 @@ module.exports = async function( repo, minifyOptions, instrument, allHTML, brand
} );

grunt.file.write( allHTMLFilename, allHTMLContents );

_7z.cmd( [ 'a', '-txz', allHTMLFilename + '.xz', allHTMLFilename ], err => {
console.log( err );
} );
grunt.file.write( `${allHTMLFilename}.gz`, zlib.gzipSync( allHTMLContents ) );
}

// Debug build (always included)
Expand Down

0 comments on commit e81aa7e

Please sign in to comment.