Permalink
Browse files

jade(1) examples

  • Loading branch information...
1 parent 09b7abc commit 19ca1f295763d3d6917a9b8ba6cc9411cccf39b5 @tj tj committed Aug 26, 2011
Showing with 20 additions and 2 deletions.
  1. +20 −2 bin/jade
View
22 bin/jade
@@ -22,10 +22,28 @@ try {
program
.version(jade.version)
+ .usage('[options] [dir|file ...]')
.option('-o, --options <str>', 'javascript options object')
- .options('-O, --out <dir>', 'output the compiled html to <dir>')
- .parse(process.argv)
+ .option('-O, --out <dir>', 'output the compiled html to <dir>')
+program.on('--help', function(){
+ console.log(' Examples:');
+ console.log('');
+ console.log(' # translate jade the templates dir');
+ console.log(' $ jade templates');
+ console.log('');
+ console.log(' # create {foo,bar}.html');
+ console.log(' $ jade {foo,bar}.jade');
+ console.log('');
+ console.log(' # jade over stdio');
+ console.log(' $ jade < my.jade > my.html');
+ console.log('');
+ console.log(' # jade over stdio');
+ console.log(' $ echo "h1 Jade!" | jade');
+ console.log('');
+});
+
+program.parse(process.argv);
//
// /**

0 comments on commit 19ca1f2

Please sign in to comment.