chore: create common directory (#6042)

These files will be used by both the web and node versions of Puppeteer.
Another name for this might be "core" but I don't want to cause
confusion with the puppeteer-core package that we publish at the moment.
This commit is contained in:
Jack Franklin
2020-06-18 15:53:23 +01:00
committed by GitHub
parent f6af7b8df0
commit 9522f80116
50 changed files with 102 additions and 98 deletions

View File

@@ -61,6 +61,7 @@ async function run() {
* we'll just list the directories manually.
*/
...(await Source.readdir(path.join(PROJECT_DIR, 'src'), 'ts')),
...(await Source.readdir(path.join(PROJECT_DIR, 'src', 'common'), 'ts')),
...(await Source.readdir(path.join(PROJECT_DIR, 'src', 'node'), 'ts')),
];
@@ -68,7 +69,11 @@ async function run() {
(source) => !source.filePath().endsWith('.d.ts')
);
const jsSources = await Source.readdir(path.join(PROJECT_DIR, 'lib'));
const jsSources = [
...(await Source.readdir(path.join(PROJECT_DIR, 'lib'))),
...(await Source.readdir(path.join(PROJECT_DIR, 'lib', 'common'))),
...(await Source.readdir(path.join(PROJECT_DIR, 'lib', 'node'))),
];
const allSrcCode = [...jsSources, ...tsSourcesNoDefinitions];
messages.push(...(await checkPublicAPI(page, mdSources, allSrcCode)));