UNPKG

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