Skip to content
Snippets Groups Projects
size.js 284 B
Newer Older
  • Learn to ignore specific revisions
  • Bye's avatar
    Bye committed
    
    var fs = require("fs");
    var stats = fs.statSync("build/game.zip");
    var fileSizeInBytes = stats.size;
    var fileSizeInKilobytes = fileSizeInBytes / 1024;
    
    console.log(`Current game size: ${Math.round(fileSizeInKilobytes*10)/10}/13.0 KB (${Math.round((fileSizeInKilobytes/13)*100)}%)`);