mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Write fp docs to a different file.
This commit is contained in:
committed by
John-David Dalton
parent
5cd7208ef3
commit
fbfa578c11
@@ -7,7 +7,8 @@ var _ = require('lodash'),
|
|||||||
|
|
||||||
var basePath = path.join(__dirname, '..', '..'),
|
var basePath = path.join(__dirname, '..', '..'),
|
||||||
docPath = path.join(basePath, 'doc'),
|
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'),
|
var pkg = require('../../package.json'),
|
||||||
version = pkg.version;
|
version = pkg.version;
|
||||||
@@ -47,9 +48,10 @@ function onComplete(error) {
|
|||||||
|
|
||||||
function build(type) {
|
function build(type) {
|
||||||
var options = _.defaults({}, config.base, config[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));
|
build(_.last(process.argv));
|
||||||
|
|||||||
Reference in New Issue
Block a user