Skip to content

Commit

Permalink
Use new script
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Mar 5, 2019
1 parent 35c28b6 commit b837712
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
11 changes: 0 additions & 11 deletions bin/generate-docs.sh

This file was deleted.

22 changes: 19 additions & 3 deletions bin/update-readmes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@ const childProcess = require( 'child_process' );

const packages = [
'e2e-test-utils',
'rich-text',
];

let aggregatedExitCode = 0;
packages.forEach( ( packageName ) => {
const args = [
const getArgsForPackage = ( packageName ) => {
const defaultArgs = [
`packages/${ packageName }/src/index.js`,
`--output packages/${ packageName }/README.md`,
'--to-token',
];

const argsForPackage = {
'rich-text': [
`packages/${ packageName }/src/index.js`,
`--output packages/${ packageName }/README.md`,
'--to-token',
'--ignore "^unstable|^apply$|^changeListType$"',
],
};

return argsForPackage[ packageName ] || defaultArgs;
};

let aggregatedExitCode = 0;
packages.forEach( ( packageName ) => {
const args = getArgsForPackage( packageName );
const pathToDocGen = path.join( __dirname, '..', 'node_modules', '.bin', 'docgen' );
const { status, stderr } = childProcess.spawnSync(
pathToDocGen,
Expand Down

0 comments on commit b837712

Please sign in to comment.