From e81aa7eab8647e01722e30f84e00fabf3b002af4 Mon Sep 17 00:00:00 2001 From: Matt Pennington Date: Fri, 26 Apr 2019 13:22:45 -0600 Subject: [PATCH] Added gzip asset for #746 --- js/grunt/buildRunnable.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/grunt/buildRunnable.js b/js/grunt/buildRunnable.js index 819b7b140..6abe8f84d 100644 --- a/js/grunt/buildRunnable.js +++ b/js/grunt/buildRunnable.js @@ -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' ); @@ -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). @@ -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)