Last active
August 29, 2015 13:59
-
-
Save earnubs/10640331 to your computer and use it in GitHub Desktop.
command line Y.Template.Micro compiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>{{ foo }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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