aboutsummaryrefslogtreecommitdiffstats
path: root/Cakefile
diff options
context:
space:
mode:
authorPhil Crosby2013-05-15 12:11:52 -0700
committerPhil Crosby2013-05-15 12:11:52 -0700
commit01112b04a4cbc4d5ac7485626752c8ddab6f2a44 (patch)
treec7974e033c26d7c237c6fe0f6eb4b1ceedb7faff /Cakefile
parent73dc312d497401792d3d639a90ccb0734040bd9c (diff)
downloadvimium-01112b04a4cbc4d5ac7485626752c8ddab6f2a44.tar.bz2
Add a task to build a zip file for the chrome store
Diffstat (limited to 'Cakefile')
-rw-r--r--Cakefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Cakefile b/Cakefile
index cc9d8d91..21967e71 100644
--- a/Cakefile
+++ b/Cakefile
@@ -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", ->