-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Updated Flow.js dependency on 0.52.0 (#862)
- Loading branch information
1 parent
aa3496a
commit e73dd98
Showing
6 changed files
with
24 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,8 @@ module.exports.description = 'inject documentation into your README.md'; | |
* @private | ||
*/ | ||
module.exports.builder = { | ||
usage: 'Usage: documentation readme [--readme-file=README.md] --section "API"' + | ||
usage: | ||
'Usage: documentation readme [--readme-file=README.md] --section "API"' + | ||
' [--compare-only] [other documentationjs options]', | ||
example: 'documentation readme index.js -s "API Docs" --github', | ||
'readme-file': { | ||
|
@@ -26,12 +27,14 @@ module.exports.builder = { | |
}, | ||
section: { | ||
alias: 's', | ||
describe: 'The section heading after which to inject generated documentation', | ||
describe: | ||
'The section heading after which to inject generated documentation', | ||
required: true | ||
}, | ||
'diff-only': { | ||
alias: 'd', | ||
describe: 'Instead of updating the given README with the generated documentation,' + | ||
describe: | ||
'Instead of updating the given README with the generated documentation,' + | ||
' just check if its contents match, exiting nonzero if not.', | ||
default: false | ||
}, | ||
|
@@ -42,8 +45,6 @@ module.exports.builder = { | |
} | ||
}; | ||
|
||
function noop() {} | ||
|
||
/** | ||
* Insert API documentation into a Markdown readme | ||
* @private | ||
|
@@ -68,9 +69,11 @@ module.exports.handler = function readme(argv: Object) { | |
|
||
argv.format = 'remark'; | ||
/* eslint no-console: 0 */ | ||
var log = argv.q | ||
? noop | ||
: console.log.bind(console, '[documentation-readme] '); | ||
const log: Function = (...data: Array<string>) => { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tmcw
Member
|
||
if (!argv.q) { | ||
console.log.apply(console, data); | ||
} | ||
}; | ||
|
||
var readmeContent = fs.readFileSync(argv.readmeFile, 'utf8'); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unfortunately my review & our CI setup let this slip through: Node v4 doesn't support parameter rest syntax and our Babel transform doesn't transpile it. I'm going to update this section to maintain v4 compatibility. Down the line we could use babel-preset-env or something to transpile new JS features, but going down that rabbit hole was nothing but a trainwreck when I tried it yesterday.