jah-compiler
v0.0.6
Published
simple coffee-script-redux organizer to compilations tasks
Downloads
11
Readme
Compiler
With this you can create files on fly or compile coffee to javascript files.
First intended to my own projects, but it help me to generate fast coffee and yaml files from command line (see program module)
Install and build
first download, and install packages; then run tests
$ mkdir compiler && cd compiler
$ npm install jahpd/compiler
$ npm install
$ npm test
this will generate some files; feel free to modify Cakefile!
Usage
//create a general file
date = new Date()
opt = {dest: path.join(__dirname, 'test.log'), data: "A simple log file\n"+date}
compile(opt, function(err, data){
// TODO middleware to data...
return data += "\n###Bye, Bye!"
})
I like use this in Cakefiles to build my coffee sources:
fs = require 'fs'
path = require 'path'
compile = require 'compiler'
task 'build', 'rebuild the custom source file', (options) ->
compile
src: path.join __dirname, 'lib', 'src', 'myfile.coffee'
dest: path.join __dirname, 'index.js'