@baloise/angular-output-target
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -6,2 +6,13 @@ # Change Log | ||
## [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) | ||
### Bug Fixes | ||
* **angular:** remove all component module ([dcf567d](https://github.com/baloise/stencil-ds-output-targets/commit/dcf567d597313a5b5bf1ec003ef9f7f25dd4bcad)) | ||
## [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) | ||
@@ -8,0 +19,0 @@ |
@@ -299,6 +299,4 @@ 'use strict'; | ||
const finalText = generateProxies(filteredComponents, pkgData, outputTarget, config.rootDir); | ||
const allComponentModule = generateAllComponentModule(filteredComponents, outputTarget); | ||
await Promise.all([ | ||
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText), | ||
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile.replace('.ts', '.module.ts'), allComponentModule), | ||
copyResources(config, outputTarget), | ||
@@ -327,31 +325,2 @@ generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget), | ||
} | ||
function generateAllComponentModule(components, outputTarget) { | ||
const childComponent = Object.values(outputTarget.componentGroups || {}) | ||
.flat() | ||
.map(o => o.components) | ||
.flat(); | ||
const moduleImports = components | ||
.map(c => c.tagName) | ||
.filter(c => !childComponent.includes(c)) | ||
.map(c => ` ${dashToPascalCase(c)}Module,`); | ||
return `/* tslint:disable */ | ||
/* auto-generated angular directive proxies */ | ||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core' | ||
import { CommonModule } from '@angular/common'; | ||
import { | ||
${moduleImports.join('\n')} | ||
} from './proxies' | ||
const modules = [ | ||
${moduleImports.join('\n')} | ||
] | ||
@NgModule({ | ||
imports: [CommonModule, ...modules], | ||
exports: [...modules], | ||
schemas: [CUSTOM_ELEMENTS_SCHEMA], | ||
}) | ||
export class BalAllComponentModule {} | ||
`; | ||
} | ||
function generateProxies(components, pkgData, outputTarget, rootDir) { | ||
@@ -358,0 +327,0 @@ const distTypesDir = path__default['default'].dirname(pkgData.types); |
@@ -290,6 +290,4 @@ import path from 'path'; | ||
const finalText = generateProxies(filteredComponents, pkgData, outputTarget, config.rootDir); | ||
const allComponentModule = generateAllComponentModule(filteredComponents, outputTarget); | ||
await Promise.all([ | ||
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText), | ||
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile.replace('.ts', '.module.ts'), allComponentModule), | ||
copyResources(config, outputTarget), | ||
@@ -318,31 +316,2 @@ generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget), | ||
} | ||
function generateAllComponentModule(components, outputTarget) { | ||
const childComponent = Object.values(outputTarget.componentGroups || {}) | ||
.flat() | ||
.map(o => o.components) | ||
.flat(); | ||
const moduleImports = components | ||
.map(c => c.tagName) | ||
.filter(c => !childComponent.includes(c)) | ||
.map(c => ` ${dashToPascalCase(c)}Module,`); | ||
return `/* tslint:disable */ | ||
/* auto-generated angular directive proxies */ | ||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core' | ||
import { CommonModule } from '@angular/common'; | ||
import { | ||
${moduleImports.join('\n')} | ||
} from './proxies' | ||
const modules = [ | ||
${moduleImports.join('\n')} | ||
] | ||
@NgModule({ | ||
imports: [CommonModule, ...modules], | ||
exports: [...modules], | ||
schemas: [CUSTOM_ELEMENTS_SCHEMA], | ||
}) | ||
export class BalAllComponentModule {} | ||
`; | ||
} | ||
function generateProxies(components, pkgData, outputTarget, rootDir) { | ||
@@ -349,0 +318,0 @@ const distTypesDir = path.dirname(pkgData.types); |
import type { CompilerCtx, ComponentCompilerMeta, Config } from '@stencil/core/internal'; | ||
import type { OutputTargetAngular, PackageJSON } from './types'; | ||
export declare function angularDirectiveProxyOutput(compilerCtx: CompilerCtx, outputTarget: OutputTargetAngular, components: ComponentCompilerMeta[], config: Config): Promise<void>; | ||
export declare function generateAllComponentModule(components: ComponentCompilerMeta[], outputTarget: OutputTargetAngular): string; | ||
export declare function generateProxies(components: ComponentCompilerMeta[], pkgData: PackageJSON, outputTarget: OutputTargetAngular, rootDir: string): string; |
@@ -12,6 +12,4 @@ import path from 'path'; | ||
const finalText = generateProxies(filteredComponents, pkgData, outputTarget, config.rootDir); | ||
const allComponentModule = generateAllComponentModule(filteredComponents, outputTarget); | ||
await Promise.all([ | ||
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile, finalText), | ||
compilerCtx.fs.writeFile(outputTarget.directivesProxyFile.replace('.ts', '.module.ts'), allComponentModule), | ||
copyResources(config, outputTarget), | ||
@@ -40,31 +38,2 @@ generateAngularDirectivesFile(compilerCtx, filteredComponents, outputTarget), | ||
} | ||
export function generateAllComponentModule(components, outputTarget) { | ||
const childComponent = Object.values(outputTarget.componentGroups || {}) | ||
.flat() | ||
.map(o => o.components) | ||
.flat(); | ||
const moduleImports = components | ||
.map(c => c.tagName) | ||
.filter(c => !childComponent.includes(c)) | ||
.map(c => ` ${dashToPascalCase(c)}Module,`); | ||
return `/* tslint:disable */ | ||
/* auto-generated angular directive proxies */ | ||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core' | ||
import { CommonModule } from '@angular/common'; | ||
import { | ||
${moduleImports.join('\n')} | ||
} from './proxies' | ||
const modules = [ | ||
${moduleImports.join('\n')} | ||
] | ||
@NgModule({ | ||
imports: [CommonModule, ...modules], | ||
exports: [...modules], | ||
schemas: [CUSTOM_ELEMENTS_SCHEMA], | ||
}) | ||
export class BalAllComponentModule {} | ||
`; | ||
} | ||
export function generateProxies(components, pkgData, outputTarget, rootDir) { | ||
@@ -71,0 +40,0 @@ const distTypesDir = path.dirname(pkgData.types); |
{ | ||
"name": "@baloise/angular-output-target", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Angular output target for @stencil/core components.", | ||
@@ -64,3 +64,3 @@ "main": "dist/index.cjs.js", | ||
}, | ||
"gitHead": "e8aa34e51d9d5669d6e036c16b17cbcf9d32a617" | ||
"gitHead": "63e87696a264d54d246ac3dcf6cd0fea41f6fb59" | ||
} |
77594
1354