Skip to content

Instantly share code, notes, and snippets.

@earnubs
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earnubs/10640331 to your computer and use it in GitHub Desktop.
Save earnubs/10640331 to your computer and use it in GitHub Desktop.
command line Y.Template.Micro compiler
node_modules
<p>{{ foo }}
#!/usr/bin/env node
var fs = require('fs');
var Micro = require('yui/template-micro').Template.Micro;
var file = process.argv[2];
fs.readFile( __dirname + '/' + file, function (err, data) {
if (err) {
throw err;
}
process.stdout.write(Micro.precompile(data.toString()));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment