The contents of this folder are used as a shared collection of scripts and files when applying a standard TypeScript configuration to modern and legacy modules within this project.
This package is meant to be consumed as a relative link, and requires the following dependencies:
typescript
Installation of the required dependencies, local to this project, can be performed by using the following commands:
yarn workspace @{scope}/{package} add --dev typescript
This package is expected to be used with TypeScript.
a TypeScript configuration file must be consumed within the target package using the following configuration definition example:
// ./tsconfig.json
{
"extends": "./../../../config/typescript/{modern|legacy}.json", // must directly alias the json file
"include": [
"./src/**/*.ts" // Set the files to include when building.
]
}
Once the ./tsconfig.json
file has been configured based on the information provided above, the following scripts can be amended to the package's ./package.json
file.
{
"scripts": {
"build": "{...other build commands...} && yarn build:src",
"build:src": "{...other source building commands...} && yarn build:module && yarn build:types",
"build:module": "tsc --declaration false --outDir ./dist/module",
"build:types": "tsc --declaration --declarationMap --declarationDir ./dist/types --emitDeclarationOnly",
"test:syntax": "tsc --noEmit"
}
}
Pull requests welcome. Please see CONTRIBUTING.md for more details.
This package is maintained by Cisco Webex for Developers.