From fc8693be0bcb80a367b8069b10f92819b2b849d2 Mon Sep 17 00:00:00 2001 From: Iam Naughton Phier Date: Fri, 27 Mar 2015 14:42:02 +0200 Subject: [PATCH] Removed cakefile as it is unused in this setup (and too complex) --- Cakefile | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 Cakefile diff --git a/Cakefile b/Cakefile deleted file mode 100644 index 2443240..0000000 --- a/Cakefile +++ /dev/null @@ -1,47 +0,0 @@ -fs = require 'fs' -option '-o', '--output [dir]', 'dir for compiled code' - -task 'watch', 'watch current dir', (options) -> - {spawn} = require 'child_process' - args = ['-w','-c'] - if options.output - args = args.concat ['./'] - - process.chdir __originalDirname - coffee = spawn 'coffee', args - coffee.stderr.on 'data', (data) -> - process.stderr.write data.toString() - coffee.stdout.on 'data', (data) -> - console.log data.toString() - -source = [ - '16col/imgtxtmode.coffee', - '16col/ansi.coffee', - '16col/bin.coffee', - '16col/idf.coffee', - '16col/adf.coffee', - '16col/sauce.coffee', - '16col/tundra.coffee', - '16col/pcboard.coffee', - '16col/avatar.coffee', - '16col/xbin.coffee', - '16col/pallette.coffee', - '16col/fonts.coffee', -] - -task 'build', 'Build merged file for production', (options) -> - {exec} = require 'child_process' - content = [] - - for file, index in source then do (file, index) -> - fs.readFile file, 'utf8', (err, fileContents) -> - throw err if err - content[index] = fileContents - if index == source.length - 1 - coffee = content.join('\n') - fs.writeFile 'textmode.coffee', coffee, 'utf8', (err) -> - throw err if err - command = 'coffee --compile textmode.coffee' - exec command, (err, stdout, stderr) -> - throw err if err - console.log stdout + stderr \ No newline at end of file