From 7e5e9f9f5f2bfd9840dd42a1ca7e26c238b0946a Mon Sep 17 00:00:00 2001 From: Serene Han Date: Thu, 14 Jan 2016 16:44:14 -0800 Subject: [PATCH] fix Cakefile test task --- proxy/Cakefile | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/proxy/Cakefile b/proxy/Cakefile index e997b7a..849390b 100644 --- a/proxy/Cakefile +++ b/proxy/Cakefile @@ -12,16 +12,6 @@ FILES = [ OUTFILE = 'build/snowflake.coffee' STATIC = 'static' -task 'test', 'snowflake unit tests', -> - testFile = 'test/snowflake.bundle.coffee' - exec 'cat ' + FILES.join(' ') + ' snowflake_test.coffee | cat > ' + - testFile, (err, stdout, stderr) -> - throw err if err - console.log stdout + stderr - exec 'coffee ' + testFile + ' -v', (err, stdout, stderr) -> - throw err if err - console.log stdout + stderr - concatCoffeeFiles = -> exec 'cat ' + FILES.join(' ') + ' | cat > ' + OUTFILE copyStaticFiles = -> exec 'cp ' + STATIC + '/* build/' @@ -30,10 +20,16 @@ compileCoffee = -> exec 'coffee -o build -c build/snowflake.coffee', (err, stdout, stderr) -> throw err if err -task 'build:concat', 'concatenate coffeescript files.', concatCoffeeFiles +task 'test', 'snowflake unit tests', -> + exec 'mkdir -p test' + testFile = 'test/snowflake.bundle.coffee' + exec 'cat ' + FILES.join(' ') + ' snowflake_test.coffee | cat > ' + testFile + exec 'coffee ' + testFile + ' -v', (err, stdout, stderr) -> + throw err if err + console.log stdout + stderr task 'build', 'build the snowflake proxy', -> - exec 'mkdir build' + exec 'mkdir -p build' concatCoffeeFiles() copyStaticFiles() compileCoffee()