@baloise/angular-output-target 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/index.cjs.js +0 -31
- package/dist/index.js +0 -31
- package/dist/output-angular.d.ts +0 -1
- package/dist/output-angular.js +0 -31
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [1.1.2](https://github.com/baloise/stencil-ds-output-targets/compare/@baloise/angular-output-target@1.1.1...@baloise/angular-output-target@1.1.2) (2022-02-10)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **angular:** remove all component module ([dcf567d](https://github.com/baloise/stencil-ds-output-targets/commit/dcf567d597313a5b5bf1ec003ef9f7f25dd4bcad))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
## [1.1.1](https://github.com/baloise/stencil-ds-output-targets/compare/@baloise/angular-output-target@1.1.0...@baloise/angular-output-target@1.1.1) (2022-01-31)
|
7
18
|
|
8
19
|
|
package/dist/index.cjs.js
CHANGED
@@ -296,10 +296,8 @@ async function angularDirectiveProxyOutput(compilerCtx, outputTarget, components
|
|
296
296
|
const rootDir = config.rootDir;
|
297
297
|
const pkgData = await readPackageJson(rootDir);
|
298
298
|
const finalText = generateProxies(filteredComponents, pkgData, outputTarget, config.rootDir);
|
299
|
-
const allComponentModule = generateAllComponentModule(filteredComponents, outputTarget);
|
300
299
|
await Promise.all([
|
301
300
|
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText),
|
302
|
-
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile.replace('.ts', '.module.ts'), allComponentModule),
|
303
301
|
copyResources(config, outputTarget),
|
304
302
|
generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget),
|
305
303
|
generateValueAccessors(compilerCtx, filteredComponents, outputTarget, config),
|
@@ -323,35 +321,6 @@ async function copyResources(config, outputTarget) {
|
|
323
321
|
},
|
324
322
|
], srcDirectory);
|
325
323
|
}
|
326
|
-
function generateAllComponentModule(components, outputTarget) {
|
327
|
-
const childComponent = Object.values(outputTarget.componentGroups || {})
|
328
|
-
.flat()
|
329
|
-
.map(o => o.components)
|
330
|
-
.flat();
|
331
|
-
const moduleImports = components
|
332
|
-
.map(c => c.tagName)
|
333
|
-
.filter(c => !childComponent.includes(c))
|
334
|
-
.map(c => ` ${dashToPascalCase(c)}Module,`);
|
335
|
-
return `/* tslint:disable */
|
336
|
-
/* auto-generated angular directive proxies */
|
337
|
-
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'
|
338
|
-
import { CommonModule } from '@angular/common';
|
339
|
-
import {
|
340
|
-
${moduleImports.join('\n')}
|
341
|
-
} from './proxies'
|
342
|
-
|
343
|
-
const modules = [
|
344
|
-
${moduleImports.join('\n')}
|
345
|
-
]
|
346
|
-
|
347
|
-
@NgModule({
|
348
|
-
imports: [CommonModule, ...modules],
|
349
|
-
exports: [...modules],
|
350
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
351
|
-
})
|
352
|
-
export class BalAllComponentModule {}
|
353
|
-
`;
|
354
|
-
}
|
355
324
|
function generateProxies(components, pkgData, outputTarget, rootDir) {
|
356
325
|
const distTypesDir = path__default['default'].dirname(pkgData.types);
|
357
326
|
const dtsFilePath = path__default['default'].join(rootDir, distTypesDir, GENERATED_DTS);
|
package/dist/index.js
CHANGED
@@ -287,10 +287,8 @@ async function angularDirectiveProxyOutput(compilerCtx, outputTarget, components
|
|
287
287
|
const rootDir = config.rootDir;
|
288
288
|
const pkgData = await readPackageJson(rootDir);
|
289
289
|
const finalText = generateProxies(filteredComponents, pkgData, outputTarget, config.rootDir);
|
290
|
-
const allComponentModule = generateAllComponentModule(filteredComponents, outputTarget);
|
291
290
|
await Promise.all([
|
292
291
|
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText),
|
293
|
-
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile.replace('.ts', '.module.ts'), allComponentModule),
|
294
292
|
copyResources(config, outputTarget),
|
295
293
|
generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget),
|
296
294
|
generateValueAccessors(compilerCtx, filteredComponents, outputTarget, config),
|
@@ -314,35 +312,6 @@ async function copyResources(config, outputTarget) {
|
|
314
312
|
},
|
315
313
|
], srcDirectory);
|
316
314
|
}
|
317
|
-
function generateAllComponentModule(components, outputTarget) {
|
318
|
-
const childComponent = Object.values(outputTarget.componentGroups || {})
|
319
|
-
.flat()
|
320
|
-
.map(o => o.components)
|
321
|
-
.flat();
|
322
|
-
const moduleImports = components
|
323
|
-
.map(c => c.tagName)
|
324
|
-
.filter(c => !childComponent.includes(c))
|
325
|
-
.map(c => ` ${dashToPascalCase(c)}Module,`);
|
326
|
-
return `/* tslint:disable */
|
327
|
-
/* auto-generated angular directive proxies */
|
328
|
-
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'
|
329
|
-
import { CommonModule } from '@angular/common';
|
330
|
-
import {
|
331
|
-
${moduleImports.join('\n')}
|
332
|
-
} from './proxies'
|
333
|
-
|
334
|
-
const modules = [
|
335
|
-
${moduleImports.join('\n')}
|
336
|
-
]
|
337
|
-
|
338
|
-
@NgModule({
|
339
|
-
imports: [CommonModule, ...modules],
|
340
|
-
exports: [...modules],
|
341
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
342
|
-
})
|
343
|
-
export class BalAllComponentModule {}
|
344
|
-
`;
|
345
|
-
}
|
346
315
|
function generateProxies(components, pkgData, outputTarget, rootDir) {
|
347
316
|
const distTypesDir = path.dirname(pkgData.types);
|
348
317
|
const dtsFilePath = path.join(rootDir, distTypesDir, GENERATED_DTS);
|
package/dist/output-angular.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import type { CompilerCtx, ComponentCompilerMeta, Config } from '@stencil/core/internal';
|
2
2
|
import type { OutputTargetAngular, PackageJSON } from './types';
|
3
3
|
export declare function angularDirectiveProxyOutput(compilerCtx: CompilerCtx, outputTarget: OutputTargetAngular, components: ComponentCompilerMeta[], config: Config): Promise<void>;
|
4
|
-
export declare function generateAllComponentModule(components: ComponentCompilerMeta[], outputTarget: OutputTargetAngular): string;
|
5
4
|
export declare function generateProxies(components: ComponentCompilerMeta[], pkgData: PackageJSON, outputTarget: OutputTargetAngular, rootDir: string): string;
|
package/dist/output-angular.js
CHANGED
@@ -9,10 +9,8 @@ export async function angularDirectiveProxyOutput(compilerCtx, outputTarget, com
|
|
9
9
|
const rootDir = config.rootDir;
|
10
10
|
const pkgData = await readPackageJson(rootDir);
|
11
11
|
const finalText = generateProxies(filteredComponents, pkgData, outputTarget, config.rootDir);
|
12
|
-
const allComponentModule = generateAllComponentModule(filteredComponents, outputTarget);
|
13
12
|
await Promise.all([
|
14
13
|
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText),
|
15
|
-
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile.replace('.ts', '.module.ts'), allComponentModule),
|
16
14
|
copyResources(config, outputTarget),
|
17
15
|
generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget),
|
18
16
|
generateValueAccessors(compilerCtx, filteredComponents, outputTarget, config),
|
@@ -36,35 +34,6 @@ async function copyResources(config, outputTarget) {
|
|
36
34
|
},
|
37
35
|
], srcDirectory);
|
38
36
|
}
|
39
|
-
export function generateAllComponentModule(components, outputTarget) {
|
40
|
-
const childComponent = Object.values(outputTarget.componentGroups || {})
|
41
|
-
.flat()
|
42
|
-
.map(o => o.components)
|
43
|
-
.flat();
|
44
|
-
const moduleImports = components
|
45
|
-
.map(c => c.tagName)
|
46
|
-
.filter(c => !childComponent.includes(c))
|
47
|
-
.map(c => ` ${dashToPascalCase(c)}Module,`);
|
48
|
-
return `/* tslint:disable */
|
49
|
-
/* auto-generated angular directive proxies */
|
50
|
-
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'
|
51
|
-
import { CommonModule } from '@angular/common';
|
52
|
-
import {
|
53
|
-
${moduleImports.join('\n')}
|
54
|
-
} from './proxies'
|
55
|
-
|
56
|
-
const modules = [
|
57
|
-
${moduleImports.join('\n')}
|
58
|
-
]
|
59
|
-
|
60
|
-
@NgModule({
|
61
|
-
imports: [CommonModule, ...modules],
|
62
|
-
exports: [...modules],
|
63
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
64
|
-
})
|
65
|
-
export class BalAllComponentModule {}
|
66
|
-
`;
|
67
|
-
}
|
68
37
|
export function generateProxies(components, pkgData, outputTarget, rootDir) {
|
69
38
|
const distTypesDir = path.dirname(pkgData.types);
|
70
39
|
const dtsFilePath = path.join(rootDir, distTypesDir, GENERATED_DTS);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@baloise/angular-output-target",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.2",
|
4
4
|
"description": "Angular output target for @stencil/core components.",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
@@ -61,5 +61,5 @@
|
|
61
61
|
],
|
62
62
|
"testURL": "http://localhost"
|
63
63
|
},
|
64
|
-
"gitHead": "
|
64
|
+
"gitHead": "63e87696a264d54d246ac3dcf6cd0fea41f6fb59"
|
65
65
|
}
|