Write fp docs to a different file.

This commit is contained in:
Benjamin Tan
2016-01-31 21:50:43 +08:00
committed by John-David Dalton
parent 5cd7208ef3
commit fbfa578c11

View File

@@ -7,7 +7,8 @@ var _ = require('lodash'),
var basePath = path.join(__dirname, '..', '..'),
docPath = path.join(basePath, 'doc'),
readmePath = path.join(docPath, 'README.md');
readmePath = path.join(docPath, 'README.md'),
fpReadmePath = path.join(docPath, 'fp.md');
var pkg = require('../../package.json'),
version = pkg.version;
@@ -47,9 +48,10 @@ function onComplete(error) {
function build(type) {
var options = _.defaults({}, config.base, config[type]),
markdown = docdown(options);
markdown = docdown(options),
filePath = fpFlag ? fpReadmePath : readmePath;
fs.writeFile(readmePath, postprocess(markdown), onComplete);
fs.writeFile(filePath, postprocess(markdown), onComplete);
}
build(_.last(process.argv));