feat(compiler-cli): add a debug
option to control the output
fixes #9208
This commit is contained in:
@ -41,9 +41,13 @@ coreBootstrap(MyComponentNgFactory, appInjector);
|
||||
The `tsconfig.json` file may contain an additional configuration block:
|
||||
```
|
||||
"angularCompilerOptions": {
|
||||
"genDir": "."
|
||||
"genDir": ".",
|
||||
"debug": true
|
||||
}
|
||||
```
|
||||
|
||||
### `genDir`
|
||||
|
||||
the `genDir` option controls the path (relative to `tsconfig.json`) where the generated file tree
|
||||
will be written. If `genDir` is not set, then the code will be generated in the source tree, next
|
||||
to your original sources. More options may be added as we implement more features.
|
||||
@ -67,6 +71,11 @@ as well. This is by design, see https://github.com/Microsoft/TypeScript/issues/8
|
||||
This makes the configuration of your runtime module loader more complex, so we don't recommend
|
||||
this option yet.
|
||||
|
||||
### `debug`
|
||||
|
||||
Set the `debug` option to true to generate debug information in the generate files.
|
||||
Default to `false`.
|
||||
|
||||
See the example in the `test/` directory for a working example.
|
||||
|
||||
## Compiler CLI
|
||||
|
@ -2,7 +2,8 @@
|
||||
"angularCompilerOptions": {
|
||||
// For TypeScript 1.8, we have to lay out generated files
|
||||
// in the same source directory with your code.
|
||||
"genDir": "."
|
||||
"genDir": ".",
|
||||
"debug": true
|
||||
},
|
||||
|
||||
"compilerOptions": {
|
||||
|
@ -152,7 +152,7 @@ export class CodeGenerator {
|
||||
StaticAndDynamicReflectionCapabilities.install(staticReflector);
|
||||
const htmlParser = new HtmlParser();
|
||||
const config = new compiler.CompilerConfig({
|
||||
genDebugInfo: true,
|
||||
genDebugInfo: options.debug === true,
|
||||
defaultEncapsulation: ViewEncapsulation.Emulated,
|
||||
logBindingUpdate: false,
|
||||
useJit: false,
|
||||
|
Reference in New Issue
Block a user