generated from reconbot/typescript-library-template
-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
bundle-types.ts
19 lines (17 loc) · 660 Bytes
/
bundle-types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// tslint:disable: no-console
import { Extractor, ExtractorConfig } from '@microsoft/api-extractor'
const config = ExtractorConfig.loadFileAndPrepare('./api-extractor.json')
// This interface provides additional runtime state that is NOT part of the config file
const options = {
// localBuild: process.argv.indexOf("--ship") < 0
}
const extractorResult = Extractor.invoke(config, options)
if (extractorResult.succeeded) {
console.log('API Extractor completed successfully')
} else {
console.error(
`API Extractor completed with ${extractorResult.errorCount} errors` +
` and ${extractorResult.warningCount} warnings`,
)
process.exit(1)
}