functions/build
Functions
buildCJSAndESM()
function buildCJSAndESM(outDir): Promise<void>
Helper function to invoke tsc
twice, producing both CommonJS (CJS) and ECMAScript modules (ESM)
output.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
outDir | string | "dist" | Optional. The full path to the directory that TypeScript puts the compiled files. Default is "dist". |
Returns
Promise
<void
>
Defined in
checkCompiledOutputInRepo()
function checkCompiledOutputInRepo(): Promise<void>
Helper function to see if the compiled output that is checked-in to the Git repository is up-to-date.
Note that compiled output (in e.g. the "dist" directory) is not usually committed to a Git repository, but this is necessary in certain cases, such as when writing a custom GitHub Action in TypeScript. In these situations, this function should be run as part of the linting stage in order to ensure that the compiled output is always up to date.
Returns
Promise
<void
>