diff --git a/README.md b/README.md index 206e99d..0cbc080 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,23 @@ npm install You need create your config.js from config.template ```bash -npm main --c=.js --t= +node main.js --c=.js --t= ``` default config -> config.js +## Test +Also you can test your parser +```bash +node test.js --c=.js +``` + +## Also +You can use <&&REPLACER{}&&> syntax for include your code here +```bash + +``` + ## Special Directives See lemon.html for additional documentation. @@ -44,4 +56,4 @@ See lemon.html for additional documentation. - %token_class - **NOT SUPPORTED** ## Original project -See https://github.com/sormy/lemon-js. \ No newline at end of file +See https://github.com/sormy/lemon-js \ No newline at end of file diff --git a/test.js b/test.js index 2d4a120..856d614 100644 --- a/test.js +++ b/test.js @@ -5,7 +5,16 @@ var fs = require("fs"); var exec = require('child_process').exec; -exec("node main.js -o=config.js -t=node", function(err, stdout, stderr) { +var cfg_path = "config.js"; +var config; +if(args["c"] !== undefined) { + config = require("./" + args["c"]); + cfg_path = args["c"]; +} else { + config = require("./config.js"); +} + +exec("node main.js -o=" + cfg_path + " -t=node", function(err, stdout, stderr) { err && console.log("ERROR: ", err); err && process.exit(1);