angular()
API > @betterer/angular > angular
Use this test to incrementally introduce Angular compiler configuration to your codebase.
Signature
export declare function angular(configFilePath: string, extraCompilerOptions: CompilerOptions): BettererFileTest;
Parameters
Parameter | Type | Description |
---|---|---|
configFilePath | string | The relative path to a tsconfig.json file. |
extraCompilerOptions | CompilerOptions | Additional Angular compiler configuration to enable. |
Returns
Exceptions
BettererError
Will throw if the user doesn't pass configFilePath
or extraCompilerOptions
.
Remarks
angular
is a BettererFileTest
, so you can use include()
, exclude()
, only()
, and skip()
.
Example
import { angular } from '@betterer/angular';
export default {
'stricter template compilation': () =>
angular('./tsconfig.json', {
strictTemplates: true
})
.include('./src/*.ts', './src/*.html')
};