diff options
| author | Phil Crosby | 2012-06-02 20:00:49 -0700 |
|---|---|---|
| committer | Phil Crosby | 2012-06-02 20:00:49 -0700 |
| commit | 625f4dc6d3cd9a281119fb92ff39a5a6680b6a51 (patch) | |
| tree | 6725170f47940a70790640a5d140f3833eed417c /Cakefile | |
| parent | efbedcd56d2f10edea834744714f72f539a193f0 (diff) | |
| download | vimium-625f4dc6d3cd9a281119fb92ff39a5a6680b6a51.tar.bz2 | |
A cakefile for autobuilding coffeescript and running tests.
Diffstat (limited to 'Cakefile')
| -rw-r--r-- | Cakefile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Cakefile b/Cakefile new file mode 100644 index 00000000..c9f855c9 --- /dev/null +++ b/Cakefile @@ -0,0 +1,14 @@ +fs = require "fs" +{spawn, exec} = require "child_process" + +task "autobuild", "continually rebuild coffeescript files using coffee --watch", -> + coffee = spawn "coffee", ["-cw", "tests", "background_scripts"] + coffee.stdout.on "data", (data) -> console.log data.toString().trim() + +task "test", "run all unit tests", -> + # Run running the command `node tests/*_test.js`. + test_files = fs.readdirSync("tests/").filter((filename) -> filename.indexOf("_test.js") > 0) + test_files = test_files.map((filename) -> "tests/" + filename) + node = spawn "node", test_files + node.stdout.on "data", (data) -> console.log data.toString().trim() + node.stderr.on "data", (data) -> console.log data.toString().trim() |
