Skip to content

Instantly share code, notes, and snippets.

@GeorgeHahn
Created May 14, 2015 21:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save GeorgeHahn/0deef2fb0d392ef507dd to your computer and use it in GitHub Desktop.
Save GeorgeHahn/0deef2fb0d392ef507dd to your computer and use it in GitHub Desktop.
<script src="jszip.min.js"></script>
<script src="FileSaver.min.js"></script>
<script src="https://raw.githubusercontent.com/Stuk/jszip/master/dist/jszip.min.js"></script>
<script src="https://raw.githubusercontent.com/eligrey/FileSaver.js/master/FileSaver.min.js"></script>
(function (main, modules) {
'use strict';
var zip = new JSZip();
for (var property in modules) {
if (modules.hasOwnProperty(property)) {
zip.file(property, modules[property].toString());
}
}
var content = zip.generate({type : "blob"});
saveAs(content, "dump.zip");
}
<script>
// Concatenated script to dump goes here
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment