Skip to content

Instantly share code, notes, and snippets.

@taijiweb
taijiweb / gulp-compiltpl.coffee
Created March 11, 2015 12:46
a coffee file to convert template to js by using peasy.coffee
es = require('event-stream')
gutil = require('gulp-util')
# compile transform function from templates by using modules/transform/transformparser
# template is in /modules/transform/textualizer/someTemplateTogenerateJavascript
generateFromTemplateFile = (file) ->
{TemplateParser, FieldTemplateListParser} = require './src/modules/transform/transformparser'
filepath = file.history[0]
#console.log JSON.stringify filepath
filename = filepath.slice(filepath.lastIndexOf('\\')+1, filepath.length-4)