Skip to content

Commit 338dc6e

Browse files
committed
feat: ng-elements components
1 parent 736774b commit 338dc6e

File tree

97 files changed

+1115
-914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1115
-914
lines changed

.bitmap

Lines changed: 57 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,219 +12,240 @@
1212
"angular-env": {
1313
"name": "angular-env",
1414
"scope": "bitdev.angular",
15-
"version": "8.1.1",
15+
"version": "8.2.3",
1616
"mainFile": "index.ts",
1717
"rootDir": "angular/envs/angular-env"
1818
},
1919
"app-types/angular-app-type": {
2020
"name": "app-types/angular-app-type",
2121
"scope": "bitdev.angular",
22-
"version": "8.1.1",
22+
"version": "8.2.2",
2323
"mainFile": "index.ts",
2424
"rootDir": "angular/app-types/angular-app-type"
2525
},
2626
"dev-services/common": {
2727
"name": "dev-services/common",
2828
"scope": "bitdev.angular",
29-
"version": "8.1.1",
29+
"version": "8.2.0",
3030
"mainFile": "index.ts",
3131
"rootDir": "angular/devkit/common"
3232
},
3333
"dev-services/compiler/elements": {
3434
"name": "dev-services/compiler/elements",
3535
"scope": "bitdev.angular",
36-
"version": "8.1.1",
36+
"version": "8.2.1",
3737
"mainFile": "index.ts",
3838
"rootDir": "angular/devkit/compiler/elements"
3939
},
4040
"dev-services/compiler/multi-compiler": {
4141
"name": "dev-services/compiler/multi-compiler",
4242
"scope": "bitdev.angular",
43-
"version": "8.1.1",
43+
"version": "8.2.1",
4444
"mainFile": "index.ts",
4545
"rootDir": "angular/devkit/compiler/multi-compiler"
4646
},
4747
"dev-services/compiler/ng-packagr": {
4848
"name": "dev-services/compiler/ng-packagr",
4949
"scope": "bitdev.angular",
50-
"version": "8.1.1",
50+
"version": "8.2.0",
5151
"mainFile": "index.ts",
5252
"rootDir": "angular/devkit/compiler/ng-packagr"
5353
},
5454
"dev-services/linter/eslint": {
5555
"name": "dev-services/linter/eslint",
5656
"scope": "bitdev.angular",
57-
"version": "5.0.0",
57+
"version": "5.1.0",
5858
"mainFile": "index.js",
5959
"rootDir": "angular/devkit/linter/eslint"
6060
},
6161
"dev-services/ng-compat": {
6262
"name": "dev-services/ng-compat",
6363
"scope": "bitdev.angular",
64-
"version": "5.0.0",
64+
"version": "5.1.0",
6565
"mainFile": "index.ts",
6666
"rootDir": "angular/devkit/ng-compat"
6767
},
6868
"dev-services/preview/mounter": {
6969
"name": "dev-services/preview/mounter",
7070
"scope": "bitdev.angular",
71-
"version": "5.1.0",
71+
"version": "5.2.1",
7272
"mainFile": "index.ts",
7373
"rootDir": "angular/devkit/preview/mounter"
7474
},
7575
"dev-services/preview/preview": {
7676
"name": "dev-services/preview/preview",
7777
"scope": "bitdev.angular",
78-
"version": "8.1.1",
78+
"version": "8.2.2",
7979
"mainFile": "index.ts",
8080
"rootDir": "angular/devkit/preview/preview"
8181
},
8282
"dev-services/preview/preview-app": {
8383
"name": "dev-services/preview/preview-app",
8484
"scope": "bitdev.angular",
85-
"version": "3.0.0",
85+
"version": "3.1.1",
8686
"mainFile": "index.ts",
8787
"rootDir": "angular/devkit/preview/preview-app"
8888
},
8989
"dev-services/preview/runtime": {
9090
"name": "dev-services/preview/runtime",
9191
"scope": "bitdev.angular",
92-
"version": "5.1.0",
92+
"version": "5.2.1",
9393
"mainFile": "index.ts",
9494
"rootDir": "angular/devkit/preview/runtime"
9595
},
9696
"dev-services/preview/vite-preview": {
9797
"name": "dev-services/preview/vite-preview",
9898
"scope": "bitdev.angular",
99-
"version": "1.1.1",
99+
"version": "1.2.2",
100100
"mainFile": "index.ts",
101101
"rootDir": "angular/devkit/preview/vite-preview"
102102
},
103103
"dev-services/vite": {
104104
"name": "dev-services/vite",
105105
"scope": "bitdev.angular",
106-
"version": "2.1.1",
106+
"version": "2.2.0",
107107
"mainFile": "index.ts",
108108
"rootDir": "angular/devkit/vite"
109109
},
110110
"dev-services/webpack": {
111111
"name": "dev-services/webpack",
112112
"scope": "bitdev.angular",
113-
"version": "8.1.1",
113+
"version": "8.2.0",
114114
"mainFile": "index.ts",
115115
"rootDir": "angular/devkit/webpack"
116116
},
117117
"envs/angular-v16-env": {
118118
"name": "envs/angular-v16-env",
119119
"scope": "bitdev.angular",
120-
"version": "8.1.1",
120+
"version": "8.2.3",
121121
"mainFile": "index.ts",
122122
"rootDir": "angular/envs/angular-v16-env"
123123
},
124124
"envs/angular-v17-env": {
125125
"name": "envs/angular-v17-env",
126126
"scope": "bitdev.angular",
127-
"version": "7.1.1",
127+
"version": "7.2.3",
128128
"mainFile": "index.ts",
129129
"rootDir": "angular/envs/angular-v17-env"
130130
},
131131
"envs/angular-v18-env": {
132132
"name": "envs/angular-v18-env",
133133
"scope": "bitdev.angular",
134-
"version": "3.1.1",
134+
"version": "3.2.3",
135135
"mainFile": "index.ts",
136136
"rootDir": "angular/envs/angular-v18-env"
137137
},
138138
"envs/angular-v19-env": {
139139
"name": "envs/angular-v19-env",
140140
"scope": "bitdev.angular",
141-
"version": "2.1.1",
141+
"version": "2.2.3",
142142
"mainFile": "index.ts",
143143
"rootDir": "angular/envs/angular-v19-env"
144144
},
145145
"envs/base-env": {
146146
"name": "envs/base-env",
147147
"scope": "bitdev.angular",
148-
"version": "8.1.1",
148+
"version": "8.2.3",
149149
"mainFile": "index.ts",
150150
"rootDir": "angular/envs/base-env"
151151
},
152152
"examples/my-angular-env": {
153153
"name": "examples/my-angular-env",
154154
"scope": "bitdev.angular",
155-
"version": "8.1.1",
155+
"version": "8.3.3",
156156
"mainFile": "index.ts",
157157
"rootDir": "angular/examples/my-angular-env"
158158
},
159159
"examples/my-angular-v16-env": {
160160
"name": "examples/my-angular-v16-env",
161161
"scope": "bitdev.angular",
162-
"version": "7.1.1",
162+
"version": "7.3.3",
163163
"mainFile": "index.ts",
164164
"rootDir": "angular/examples/my-angular-v16-env"
165165
},
166166
"examples/my-angular-v17-env": {
167167
"name": "examples/my-angular-v17-env",
168168
"scope": "bitdev.angular",
169-
"version": "7.1.1",
169+
"version": "7.3.3",
170170
"mainFile": "index.ts",
171171
"rootDir": "angular/examples/my-angular-v17-env"
172172
},
173173
"examples/my-angular-v18-env": {
174174
"name": "examples/my-angular-v18-env",
175175
"scope": "bitdev.angular",
176-
"version": "3.1.1",
176+
"version": "3.3.3",
177177
"mainFile": "index.ts",
178178
"rootDir": "angular/examples/my-angular-v18-env"
179179
},
180180
"examples/my-angular-v19-env": {
181181
"name": "examples/my-angular-v19-env",
182182
"scope": "bitdev.angular",
183-
"version": "2.1.1",
183+
"version": "2.3.3",
184184
"mainFile": "index.ts",
185185
"rootDir": "angular/examples/my-angular-v19-env"
186186
},
187187
"integration/demo-app": {
188188
"name": "integration/demo-app",
189189
"scope": "bitdev.angular",
190-
"version": "2.1.1",
190+
"version": "2.2.3",
191191
"mainFile": "index.ts",
192192
"rootDir": "angular/integration/demo-app"
193193
},
194194
"integration/demo-elements": {
195195
"name": "integration/demo-elements",
196196
"scope": "bitdev.angular",
197-
"version": "0.0.1",
198-
"mainFile": "public-api.ts",
197+
"version": "0.1.3",
198+
"mainFile": "demo-elements.ng-elements.ts",
199199
"rootDir": "angular/integration/demo-elements"
200200
},
201+
"integration/demo-lib-v16": {
202+
"name": "integration/demo-lib-v16",
203+
"scope": "bitdev.angular",
204+
"version": "2.1.2",
205+
"mainFile": "public-api.ts",
206+
"rootDir": "angular/integration/demo-lib-v16"
207+
},
208+
"integration/demo-lib-v17": {
209+
"name": "integration/demo-lib-v17",
210+
"scope": "bitdev.angular",
211+
"version": "2.1.2",
212+
"mainFile": "public-api.ts",
213+
"rootDir": "angular/integration/demo-lib-v17"
214+
},
215+
"integration/demo-lib-v18": {
216+
"name": "integration/demo-lib-v18",
217+
"scope": "bitdev.angular",
218+
"version": "2.1.2",
219+
"mainFile": "public-api.ts",
220+
"rootDir": "angular/integration/demo-lib-v18"
221+
},
201222
"integration/demo-lib-v19": {
202223
"name": "integration/demo-lib-v19",
203224
"scope": "bitdev.angular",
204-
"version": "2.1.1",
225+
"version": "2.1.3",
205226
"mainFile": "public-api.ts",
206227
"rootDir": "angular/integration/demo-lib-v19"
207228
},
208-
"integration/ng-elements-env": {
209-
"name": "integration/ng-elements-env",
229+
"integration/my-react-app": {
230+
"name": "integration/my-react-app",
210231
"scope": "bitdev.angular",
211-
"version": "0.0.1",
232+
"version": "0.1.3",
212233
"mainFile": "index.ts",
213-
"rootDir": "angular/integration/ng-elements-env"
234+
"rootDir": "angular/integration/my-react-app"
214235
},
215236
"templates/generators": {
216237
"name": "templates/generators",
217238
"scope": "bitdev.angular",
218-
"version": "8.1.1",
239+
"version": "8.2.0",
219240
"mainFile": "index.ts",
220241
"rootDir": "angular/templates/generators"
221242
},
222243
"templates/starters": {
223244
"name": "templates/starters",
224245
"scope": "bitdev.angular",
225-
"version": "8.1.1",
246+
"version": "8.2.0",
226247
"mainFile": "index.ts",
227248
"rootDir": "angular/templates/starters"
228249
},
229250
"$schema-version": "17.0.0"
230-
}
251+
}

angular/app-types/angular-app-type/angular.application.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ import { VERSION } from '@angular/cli';
22
import { getWorkspace, NG_APP_NAME, normalizePath } from '@bitdev/angular.dev-services.common';
33
import { ApplicationBuilderOptions, SsrClass } from '@bitdev/angular.dev-services.ng-compat';
44
import { AngularVitePreview } from '@bitdev/angular.dev-services.preview.vite-preview';
5-
import { buildApplication, generateAppTsConfig, getEnvFile, serveApplication } from '@bitdev/angular.dev-services.vite';
5+
import {
6+
buildApplication,
7+
BuildOutput,
8+
generateAppTsConfig,
9+
getEnvFile,
10+
readTsConfig,
11+
serveApplication
12+
} from '@bitdev/angular.dev-services.vite';
613
import {
714
AppBuildContext,
815
AppBuildResult,
@@ -111,12 +118,13 @@ export class AngularApp implements Application {
111118
const appRootPath = workspace.componentDir(context.appComponent.id, {
112119
ignoreVersion: true
113120
});
114-
const appTsconfigPath = join(appRootPath, this.options.angularServeOptions.tsConfig);
121+
const appTsConfigPath = join(appRootPath, this.options.angularServeOptions.tsConfig);
122+
const appTsConfig = readTsConfig(appTsConfigPath);
115123
const workspaceCmpsIDs = workspace.listIds();
116124
const bitCmps = await workspace.getMany(workspaceCmpsIDs);
117125
const tempFolder = this.getTempFolder(workspace);
118126
const tsconfigPath = this.getTsconfigPath(tempFolder);
119-
generateAppTsConfig(bitCmps, appRootPath, appTsconfigPath, tsconfigPath, depsResolver, workspace);
127+
generateAppTsConfig(bitCmps, appRootPath, appTsConfig, tsconfigPath, depsResolver, workspace);
120128

121129
const envVars = await getEnvFile('development', appRootPath, context.envVariables as any);
122130
await serveApplication({
@@ -147,7 +155,8 @@ export class AngularApp implements Application {
147155
const logger = context.createLogger(this.name);
148156
const outputPath = this.getPublicDir(context.artifactsDir);
149157
const appRootPath = capsule.path;
150-
const appTsconfigPath = join(appRootPath, this.options.angularBuildOptions.tsConfig);
158+
const appTsConfigPath = join(appRootPath, this.options.angularBuildOptions.tsConfig);
159+
const appTsConfig = readTsConfig(appTsConfigPath);
151160
const appOptions = this.options.angularBuildOptions as ApplicationBuilderOptions;
152161
let entryServer: string | undefined;
153162
if ((appOptions.ssr as SsrClass)?.entry) {
@@ -157,7 +166,7 @@ export class AngularApp implements Application {
157166
}
158167
const tempFolder = this.getTempFolder();
159168
const tsconfigPath = this.getTsconfigPath(tempFolder);
160-
generateAppTsConfig([capsule.component], appRootPath, appTsconfigPath, tsconfigPath, depsResolver, undefined, entryServer ? [entryServer] : undefined);
169+
generateAppTsConfig([capsule.component], appRootPath, appTsConfig, tsconfigPath, depsResolver, undefined, entryServer ? [entryServer] : undefined);
161170

162171
const errors: Error[] = [];
163172
if (!this.options.bundler) {
@@ -176,7 +185,7 @@ export class AngularApp implements Application {
176185
envVars: {
177186
'process.env': envVars
178187
}
179-
});
188+
}) as BuildOutput[];
180189
for (const result of results) {
181190
if (result.error) {
182191
errors.push(new Error(result.error));

angular/app-types/angular-app-type/component.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"componentId": {
33
"scope": "bitdev.angular",
44
"name": "app-types/angular-app-type",
5-
"version": "8.1.1"
5+
"version": "8.2.1"
66
},
77
"propagate": false,
88
"extensions": {
@@ -23,9 +23,9 @@
2323
"version": "02f8cd3d639894dea416cc38674a6887e11e939b"
2424
}
2525
},
26-
"bitdev.node/[email protected]": {},
2726
"teambit.envs/envs": {
2827
"env": "bitdev.node/node-env"
29-
}
28+
},
29+
"bitdev.node/[email protected]": {}
3030
}
3131
}

angular/devkit/common/component.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"componentId": {
33
"scope": "bitdev.angular",
44
"name": "dev-services/common",
5-
"version": "8.1.1"
5+
"version": "8.2.0"
66
},
77
"propagate": false,
88
"extensions": {
@@ -27,6 +27,6 @@
2727
"teambit.docs/docs": {},
2828
"teambit.pipelines/builder": {},
2929
"teambit.semantics/schema": {},
30-
"teambit.node/[email protected].103": {}
30+
"teambit.node/[email protected].110": {}
3131
}
3232
}

angular/devkit/common/env-options.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ export type AngularEnvOptions = {
77
* Use Rollup & Angular Elements to compile compositions instead of webpack.
88
* This transforms compositions into Web Components and replaces the Angular bundler by the React bundler.
99
*/
10-
useAngularElements?: boolean;
1110
jestModulePath: string;
1211
ngPackagrModulePath: string;
13-
angularElementsModulePath?: string;
1412
webpackConfigFactory?: WebpackConfigFactory;
1513
webpackDevServerModulePath?: string;
1614
webpackModulePath?: string;

0 commit comments

Comments
 (0)