aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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", ->