diff options
| author | Phil Crosby | 2013-05-15 12:11:52 -0700 |
|---|---|---|
| committer | Phil Crosby | 2013-05-15 12:11:52 -0700 |
| commit | 01112b04a4cbc4d5ac7485626752c8ddab6f2a44 (patch) | |
| tree | c7974e033c26d7c237c6fe0f6eb4b1ceedb7faff /Cakefile | |
| parent | 73dc312d497401792d3d639a90ccb0734040bd9c (diff) | |
| download | vimium-01112b04a4cbc4d5ac7485626752c8ddab6f2a44.tar.bz2 | |
Add a task to build a zip file for the chrome store
Diffstat (limited to 'Cakefile')
| -rw-r--r-- | Cakefile | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -50,6 +50,24 @@ task "clean", "removes any js files which were compiled from coffeescript", -> task "autobuild", "continually rebuild coffeescript files using coffee --watch", -> coffee = spawn "coffee", ["-cw", __dirname] +task "package", "Builds a zip file in preparation submission to the chrome store. Output is in dist/", -> + # To get exec-sync, `npm install exec-sync`. We use this for synchronously executing shell commands. + execSync = require("exec-sync") + + invoke "build" + + execSync "rm -rf dist/vimium" + execSync "mkdir -p dist/vimium" + + blacklist = [".*", "*.coffee", "*.md", "reference", "test_harnesses", "tests", "dist", "git_hooks", + "CREDITS", "node_modules", "MIT-LICENSE.txt", "Cakefile"] + rsyncOptions = [].concat.apply( + ["-r", ".", "dist/vimium"], + blacklist.map((item) -> ["--exclude", "'#{item}'"])) + + execSync "rsync " + rsyncOptions.join(" ") + execSync "cd dist && zip -r vimium.zip vimium" + # This builds a CRX that's distributable outside of the Chrome web store. Is this used by folks who fork # Vimium and want to distribute their fork? task "package-custom-crx", "build .crx file", -> |
