fix(tsc-wrapped): use agreed on options names (#14630)

This commit is contained in:
Chuck Jazdzewski
2017-02-22 10:57:01 -08:00
committed by Igor Minar
parent fcc1d17ccb
commit c9bfc59a21
14 changed files with 59 additions and 66 deletions

View File

@ -25,40 +25,34 @@ interface Options extends ts.CompilerOptions {
// Don't produce .ngfactory.ts or .ngstyle.ts files
skipTemplateCodegen?: boolean;
// Whether to generate a bundle index of the given name and the corresponding bundled
// metadata. This option is intended to be used when creating library bundles similar
// to how `@angular/core` and `@angular/common` are generated.
// Whether to generate a flat module index of the given name and the corresponding
// flat module metadata. This option is intended to be used when creating flat
// modules similar to how `@angular/core` and `@angular/common` are packaged.
// When this option is used the `package.json` for the library should refered to the
// generated bundle index instead of the library index file. Only the bundle index
// metadata is required as the bundle index contains all metadata visible from the
// bundle index. The bundle index is used to import symbols for generating
// .ngfactory.ts files and includes both the public API from the root .ts file as well
// as shrowded internal symbols.
// The by default the .ts file supplied in the `files` files field is assumed to be
// generated flat module index instead of the library index file. When using this
// option only one .metadata.json file is produced that contains all the metadata
// necessary for symbols exported from the library index.
// In the generated .ngfactory.ts files flat module index is used to import symbols
// includes both the public API from the library index as well as shrowded internal
// symbols.
// By default the .ts file supplied in the `files` files field is assumed to be
// library index. If more than one is specified, uses `libraryIndex` to select the
// file to use. If more than on .ts file is supplied and no `libraryIndex` is supllied
// file to use. If more than on .ts file is supplied and no `libraryIndex` is supplied
// an error is produced.
// A bundle index .d.ts and .js will be created with the given `bundleIndex` name in the
// same location as the library index .d.ts file is emitted.
// For example, if a library uses `index.ts` file as the root file, the `tsconfig.json`
// `files` field would be `["index.ts"]`. The `bundleIndex` options could then be set
// to, for example `"bundle_index"`, which produces a `bundle_index.d.ts` and
// `bundle_index.metadata.json` files. The library's `package.json`'s `module` field
// would be `"bundle_index.js"` and the `typings` field would be `"bundle_index.d.ts"`.
bundleIndex?: string;
// A flat module index .d.ts and .js will be created with the given `flatModuleOutFile`
// name in the same location as the library index .d.ts file is emitted.
// For example, if a library uses `public_api.ts` file as the library index of the
// module the `tsconfig.json` `files` field would be `["public_api.ts"]`. The
// `flatModuleOutFile` options could then be set to, for example `"index.js"`, which
// produces `index.d.ts` and `index.metadata.json` files. The library's
// `package.json`'s `module` field would be `"index.js"` and the `typings` field would
// be `"index.d.ts"`.
flatModuleOutFile?: string;
// Override which module is used as the library index. This is only meaningful if
// `bundleIndex` is also supplied and only necessary if more than one `.ts` file is
// supplied in the `files` field. This must be of the form found in a import
// declaration. For example, if the library index is in `index.ts` then the
// `libraryIndex` field should be `"./index"`.
libraryIndex?: string;
// Preferred module name to use for importing the generated bundle. References
// generated by `ngc` will use this module name when importing symbols from the
// generated bundle. This is only meaningful when `bundleIndex` is also supplied. It is
// otherwise ignored.
importAs?: string;
// Preferred module id to use for importing flat module. References generated by `ngc`
// will use this module name when importing symbols from the flat module. This is only
// meaningful when `flatModuleOutFile` is also supplied. It is otherwise ignored.
flatModuleId?: string;
// Whether to generate code for library code.
// If true, produce .ngfactory.ts and .ngstyle.ts files for .d.ts inputs.