1 | import { ExternalsEntry, ProjectConfig, ProjectConfigBase } from './project-config';
|
2 | /**
|
3 | * @additionalProperties false
|
4 | */
|
5 | export interface TsTranspilationOptions {
|
6 | /**
|
7 | * Typescript configuration file for this transpilation.
|
8 | */
|
9 | tsConfig?: string;
|
10 | /**
|
11 | * If true, use tsc instead of ngc.
|
12 | */
|
13 | useTsc?: boolean;
|
14 | /**
|
15 | * Custom output directory for this transpilation.
|
16 | */
|
17 | outDir?: string;
|
18 | /**
|
19 | * Override script target for this transpilation.
|
20 | */
|
21 | target?: 'es5' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'esnext';
|
22 | /**
|
23 | * Override declaration option for this transpilation.
|
24 | */
|
25 | declaration?: boolean;
|
26 | /**
|
27 | * If true, templateUrl and styleUrls resources are inlined.
|
28 | */
|
29 | inlineAssets?: boolean;
|
30 | /**
|
31 | * If true, replaces version placeholder with package version.
|
32 | */
|
33 | replaceVersionPlaceholder?: boolean;
|
34 | /**
|
35 | * Move typing and metadata files to package.json output directory root.
|
36 | */
|
37 | moveTypingFilesToPackageRoot?: boolean;
|
38 | /**
|
39 | * If true, re-export secondary entry point typing and metadata file at output root.
|
40 | */
|
41 | reExportTypingEntryToOutputRoot?: boolean;
|
42 | }
|
43 | /**
|
44 | * @additionalProperties false
|
45 | */
|
46 | export interface LibBundleOptions {
|
47 | /**
|
48 | * Bundle module format.
|
49 | */
|
50 | libraryTarget?: 'umd' | 'es';
|
51 | /**
|
52 | * Bundle tool to be used.
|
53 | */
|
54 | bundleTool?: 'rollup' | 'webpack';
|
55 | /**
|
56 | * Custom webpack config file to be merged.
|
57 | */
|
58 | webpackConfig?: string;
|
59 | /**
|
60 | * The entry file to be bundled.
|
61 | */
|
62 | entry?: string;
|
63 | /**
|
64 | * The typescript configuration file to be used.
|
65 | */
|
66 | tsConfig?: string;
|
67 | /**
|
68 | * Entry root directory resolution.
|
69 | */
|
70 | entryRoot?: 'root' | 'outputPath' | 'tsTranspilationOutDir' | 'prevBundleOutDir';
|
71 | /**
|
72 | * Array index for entry root tsTranspilationResult.
|
73 | */
|
74 | tsTranspilationIndex?: number;
|
75 | /**
|
76 | * Custom bundle output file path.
|
77 | */
|
78 | outputFilePath?: string;
|
79 | /**
|
80 | * The externals configuration option provides a way of excluding dependencies from the output bundle.
|
81 | */
|
82 | externals?: ExternalsEntry | ExternalsEntry[];
|
83 | /**
|
84 | * If true, node_modules packages are not included in bundle.
|
85 | */
|
86 | nodeModulesAsExternals?: boolean;
|
87 | /**
|
88 | * If true, predefined Angular and rxjs globals are added.
|
89 | */
|
90 | includeDefaultAngularAndRxJsGlobals?: boolean;
|
91 | /**
|
92 | * If true, minify file will be generated.
|
93 | */
|
94 | minify?: boolean;
|
95 | }
|
96 | /**
|
97 | * @additionalProperties false
|
98 | */
|
99 | export interface LibProjectConfigBase extends ProjectConfigBase {
|
100 | /**
|
101 | * Typescript transpilation options.
|
102 | */
|
103 | tsTranspilations?: TsTranspilationOptions[] | boolean;
|
104 | /**
|
105 | * The main entry point file for package.json.
|
106 | */
|
107 | packageEntryFileForTsTranspilation?: string;
|
108 | /**
|
109 | * Represents your umd bundle name, by which other scripts on the same page can access it.
|
110 | */
|
111 | libraryName?: string;
|
112 | /**
|
113 | * The externals configuration option provides a way of excluding dependencies from the output bundle.
|
114 | */
|
115 | externals?: ExternalsEntry | ExternalsEntry[];
|
116 | /**
|
117 | * If true, node_modules packages are not included in bundle.
|
118 | */
|
119 | nodeModulesAsExternals?: boolean;
|
120 | /**
|
121 | * If true, predefined Angular and rxjs globals are added.
|
122 | */
|
123 | includeDefaultAngularAndRxJsGlobals?: boolean;
|
124 | /**
|
125 | * Bundle target options.
|
126 | */
|
127 | bundles?: LibBundleOptions[] | boolean;
|
128 | /**
|
129 | * The output root directory for package.json file.
|
130 | */
|
131 | packageJsonOutDir?: string;
|
132 | /**
|
133 | * Copy package.json file to output path.
|
134 | */
|
135 | packageJsonCopy?: boolean;
|
136 | }
|
137 | export interface LibEnvOverridesOptions {
|
138 | [name: string]: LibProjectConfigBase;
|
139 | }
|
140 | /**
|
141 | * @additionalProperties false
|
142 | */
|
143 | export interface LibProjectConfig extends LibProjectConfigBase, ProjectConfig<LibProjectConfigBase> {
|
144 | /**
|
145 | * To override properties based on build environment.
|
146 | */
|
147 | envOverrides?: LibEnvOverridesOptions;
|
148 | }
|