a easy tool to make dir with markdown
generate dir with using a markdown file
npm install dir-generate
var dg = require('dir-generate');
dg.runMarkdownFile('/Users/gkuchan/Documents/index.md', '/Users/gkuchan/Documents', function (err) {
if(err) {
console.log('Oh no!');
return;
}
console.log('Everything is ok.')
});
- runMarkdownFile(filePath, dirPath, callback)
===============
npm install -g dir-generate
dir-generate -help
Usage: dir-generate [options]
Options:
-h, --help output usage information
-d, --dir [source_dir] set target dir path. defaults to ./
-f, --file [source_file] set config file path. defaults to ./index.md
- make jshint
- make test
- make cov
- make test-all
===============
index.md
--------------------------
* folder1
* hello.html
* 1-1
* abc.txt
* 1-2
* folder2
* 233.md
* folder3
* 3-1
* 3-1-1
* 3-1-1-1
* hehe.js
--------------------------
dir-generate -d ./ -f ./index.md
- the folder name cannot have a Filename Extension
- the file name must have a Filename Extension
use json to generate dir
MIT