If you just want the get the source code, you can use git and do
git clone https://github.com/Stuk/jszip.git to get the sources. You can also
download the latest sources here.
The dependencies are handled by npm, the first step is to run
npm install to get the dependencies.
JSZip uses Grunt to handle the build, see here to install its CLI.
Here are the interesting build commands :
gruntwill generate the final js file in dist/ and the minified version.
npm run test-nodewill run the tests in nodejs.
npm run test-browserwill the tests in some browsers using SauceLabs, see below.
npm run testwill run the tests in nodejs and in the browser.
npm run lintwill use jshint the check the source code.
The documentation uses jekyll on gh-pages. To render the documentation, you
need to install jekyll and then run
jekyll serve --baseurl ''.
To test JSZip in nodejs, use
npm run test-node.
To test JSZip in a browser, you can open the file
test/index.html in the
browser you want to test. Don’t forget to update the dist/ files with
You can also test JSZip in a lot of browsers at once with SauceLabs. You will need a SauceLabs account and two variables into your environment. On linux, just use
export SAUCE_USERNAME=your-saucelabs-username export SAUCE_ACCESS_KEY=your-saucelabs-access-key
before running the
npm run test-browser command.
If you have tested bug fixes or new features, you can open a pull request on Github.