Skip to content

Commit

Permalink
Write fp docs to a different file.
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjmnt4n authored and jdalton committed Feb 5, 2016
1 parent a068bfe commit 758652b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/doc/build.js
Expand Up @@ -10,7 +10,8 @@ var mapping = require('../../fp/_mapping'),

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;
Expand Down Expand Up @@ -53,9 +54,10 @@ function build(fpFlag, type) {
applyFPMapping(mapping);
}
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(_.includes(process.argv, '--fp'), _.last(process.argv));

0 comments on commit 758652b

Please sign in to comment.