feat(compiler): scaffold compiler-dom

This commit is contained in:
Evan You
2019-09-16 15:06:45 -04:00
parent c9a1b00c1e
commit 1c8f5b612a
10 changed files with 103 additions and 19 deletions

20
scripts/bootstrap.js vendored
View File

@@ -47,6 +47,26 @@ files.forEach(shortName => {
fs.writeFileSync(readmePath, `# ${name}`)
}
const apiExtractorConfigPath = path.join(
packagesDir,
shortName,
`api-extractor.json`
)
if (args.force || !fs.existsSync(apiExtractorConfigPath)) {
fs.writeFileSync(
apiExtractorConfigPath,
`
{
"extends": "../../api-extractor.json",
"mainEntryPointFilePath": "./dist/packages/<unscopedPackageName>/src/index.d.ts",
"dtsRollup": {
"untrimmedFilePath": "./dist/<unscopedPackageName>.d.ts"
}
}
`.trim()
)
}
const srcDir = path.join(packagesDir, shortName, `src`)
const indexPath = path.join(packagesDir, shortName, `src/index.ts`)
if (args.force || !fs.existsSync(indexPath)) {