nl_tokens: Shortcut to read a template file apply a context and write it to a new file . // todo refactor template utilities from .. / util . js to lib / template . js
pl_tokens: function writeTemplateFileSync ( <mask> , context , destination ) { var templateContent = fs . readFileSync ( source , 'utf8' ) ; var templateResult ; try { templateResult = _ . template ( templateContent , context ) ; } catch ( error ) { console . error ( 'templateFileSync() error with source' , source , ' and ' , destination ) ; console . error ( error ) ; } fs . writeFileSync ( destination , templateResult ) ; }