EFForg/privacybadgerchrome — pull request #306 by SomMeri (2014-12-02 15:11:13+00:00)
Title: Grunt build script

This adds grunt build script. Related to: https://github.com/EFForg/privacybadgerchrome/issues/305

Note: I did ported build script, but not unit tests yet. I will do so only if there is an interest in this kind of change. Tests are written in python, so I would have to either
* rewrite them into javascript based selenium or
* make windows batch scripts and trigger them from grunt.

External dependencies: node.js, npm, OpenSSL, grunt command line. Installations:

1. Nodejs: Install node.js either directly from node.js [download](http://nodejs.org/download/) page or using any of these [package managers](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager). Successfully installed node.js prints its version number if you type `node -v` into console.
1. Npm: Most node.js installers and package managers install both node.js and npm. Type `npm -v` into console to test whether you have it. If it is available, it will print its version number. What you should do if it is not available [depends on your operating system](http://meri-stuff.blogspot.sk/2013/06/building-javascript-library-with-gruntjs.html#Node.jsandNpmInstallation).
1. OpenSSL: Linux should have it, windows binaries are [here](https://www.openssl.org/related/binaries.html).
1. Grunt: Open console and type `npm install -g grunt-cli`

Once everything is installed, you have to go to `privacybadgerchrome` directory and type `npm install` there. This have to be done only once. The command reads project dependencies from `package.json` file and installs everything needed from npm.

Install project dependencies from npm: `npm install`

Chrome extension is build using command: `grunt`

It will create new directory `distribution` with two files in it:
* `privacy_badger-chrome.crx`,
* `privacy_badger-chrome-.zip`.