Removed cakefile as it is unused in this setup (and too complex)
This commit is contained in:
parent
466b416506
commit
fc8693be0b
1 changed files with 0 additions and 47 deletions
47
Cakefile
47
Cakefile
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue