component-render
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -0,1 +1,6 @@ | ||
0.2.1 / 2013-08-17 | ||
================== | ||
* Change output option befavor | ||
0.2.0 / 2013-08-16 | ||
@@ -2,0 +7,0 @@ ================== |
{ | ||
"name": "component-render", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Render html files from template files for component", | ||
@@ -22,3 +22,4 @@ "keywords": [ | ||
"jade": "~0.31.0", | ||
"debug": "~0.7.2" | ||
"debug": "~0.7.2", | ||
"mkdirp": "~0.3.5" | ||
}, | ||
@@ -25,0 +26,0 @@ "devDependencies": { |
@@ -29,3 +29,3 @@ # component-render | ||
-l, --local <json> local <json> file | ||
-o, --out <dir> output the compiled html to <dir> | ||
-o, --out <path> output html file <path> | ||
-u, --use <name> use the given render <name> plugin | ||
@@ -45,4 +45,4 @@ | ||
# render html file to output directory path | ||
$ component render -o ./render simple.jade | ||
# render html file to output path | ||
$ component render -o ./static/html/simple.html simple.jade | ||
@@ -55,3 +55,3 @@ # render html file with plugin | ||
## Template engine | ||
Support `Jade` template engine. `Hogan`, `EJS`, and other template engine, you can support with plugin. | ||
Use `Jade` template engine. `Hogan`, `EJS`, and other template engine, you can support with plugin. | ||
@@ -58,0 +58,0 @@ |
@@ -51,4 +51,4 @@ 'use strict'; | ||
it('expect to contain "-o, --out <dir>"', function (done) { | ||
expect(this.stdout).to.contain('-o, --out <dir>'); | ||
it('expect to contain "-o, --out <path>"', function (done) { | ||
expect(this.stdout).to.contain('-o, --out <path>'); | ||
done(); | ||
@@ -55,0 +55,0 @@ }); |
@@ -14,4 +14,4 @@ 'use strict'; | ||
var TEMPLATE_FIXTURES_PATH = __dirname + '/fixtures/templates/simple.jade'; | ||
var GENERATE_DIR = __dirname + '/fixtures'; | ||
var GENERATE_HTML_PATH = __dirname + '/fixtures/simple.html'; | ||
var GENERATE_DIR = __dirname + '/fixtures/static/html'; | ||
var GENERATE_HTML_PATH = __dirname + '/fixtures/static/html/simple.html'; | ||
@@ -45,4 +45,5 @@ | ||
var cleanup = function (done) { | ||
if (fs.existsSync(GENERATE_HTML_PATH)) { | ||
if (fs.existsSync(GENERATE_DIR)) { | ||
fs.unlinkSync(GENERATE_HTML_PATH); | ||
fs.rmdirSync(GENERATE_DIR); | ||
} | ||
@@ -77,6 +78,6 @@ done(); | ||
testOutOption('--out', GENERATE_DIR, commonDescribes, cleanup); | ||
testOutOption('-o', GENERATE_DIR, commonDescribes, cleanup); | ||
testOutOption('--out', GENERATE_HTML_PATH, commonDescribes, cleanup); | ||
testOutOption('-o', GENERATE_HTML_PATH, commonDescribes, cleanup); | ||
}); // end of 'component-render' |
Sorry, the diff of this file is not supported yet
19646
414
4
+ Addedmkdirp@~0.3.5