This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 748
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(angular): support nested module folders
- nested folder support for cds/angular - fixes missing sub module support for broken treeshaking - improves generated directive basic types Signed-off-by: Cory Rylan <splintercode.cb@gmail.com>
- Loading branch information
Showing
32 changed files
with
231 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ | |
}, | ||
"configurations": { | ||
"production": { | ||
"sourceMap": true, | ||
"budgets": [ | ||
{ | ||
"type": "initial", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/angular/projects/cds-angular/_stubs/directive.ts.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved. | ||
* This software is released under MIT license. | ||
* The full license information can be found in LICENSE in the root directory of this project. | ||
*/ | ||
|
||
import { Directive, ElementRef, {{#hasProps}} Input {{/hasProps}} {{#hasEvents}}, Output, EventEmitter {{/hasEvents}} } from '@angular/core'; | ||
import { {{elementClassName}} } from '@cds/core/{{{directiveModule}}}'; | ||
|
||
@Directive({ selector: '{{tagName}}' }) | ||
export class {{directiveClassName}} { | ||
protected element: {{elementClassName}}; | ||
|
||
{{#props}} | ||
get {{name}}() { | ||
return this.element.{{name}}; | ||
} | ||
{{! empty string is added to support boolean attrs https://github.com/angular/angular/issues/14761 }} | ||
@Input() set {{name}}(value{{#isBoolean}}: boolean | ''{{/isBoolean}}) { | ||
this.element.{{name}} = {{#isBoolean}}!!{{/isBoolean}}value; | ||
}; | ||
{{/props}} | ||
|
||
{{#events}} | ||
@Output() {{name}}: EventEmitter<CustomEvent> = new EventEmitter(); | ||
{{/events}} | ||
|
||
constructor(elementRef: ElementRef) { | ||
this.element = elementRef.nativeElement; | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...-angular/src/cds/_stubs/index.ts.mustache → ...ects/cds-angular/_stubs/index.ts.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/* | ||
* Copyright (c) 2016-2020 VMware, Inc. All Rights Reserved. | ||
* Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved. | ||
* This software is released under MIT license. | ||
* The full license information can be found in LICENSE in the root directory of this project. | ||
*/ | ||
|
||
{{#directives}} | ||
export * from './{{directiveFileName}}.directive'; | ||
export * from './{{{directiveFileName}}}.directive'; | ||
{{/directives}} | ||
|
||
export * from './{{moduleFileName}}.module'; | ||
export * from './{{{moduleFileName}}}.module'; |
7 changes: 3 additions & 4 deletions
7
...angular/src/cds/_stubs/module.ts.mustache → ...cts/cds-angular/_stubs/module.ts.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/angular/projects/cds-angular/_stubs/package.json.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "@cds/angular/{{{moduleDirectory}}}", | ||
"ngPackage": { | ||
"lib": { | ||
"entryFile": "public-api.ts", | ||
"flatModuleFile": "{{{moduleFileName}}}" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
* Public API Surface of cds-angular | ||
*/ | ||
|
||
export * from './cds/components/index'; | ||
export * from './index'; |
4 changes: 2 additions & 2 deletions
4
...lar/src/cds/_stubs/root-index.ts.mustache → ...cds-angular/_stubs/root-index.ts.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/* | ||
* Copyright (c) 2016-2020 VMware, Inc. All Rights Reserved. | ||
* Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved. | ||
* This software is released under MIT license. | ||
* The full license information can be found in LICENSE in the root directory of this project. | ||
*/ | ||
|
||
export * from './cds-angular.module'; | ||
|
||
{{#modules}} | ||
export * from './{{moduleDirectoryName}}/index'; | ||
export * from '@cds/angular/{{{moduleDirectory}}}'; | ||
{{/modules}} |
8 changes: 2 additions & 6 deletions
8
...ar/src/cds/_stubs/root-module.ts.mustache → ...ds-angular/_stubs/root-module.ts.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ | |
"url": "https://github.com/vmware/clarity/issues" | ||
}, | ||
"schematics": "./schematics/cds-collection.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
packages/angular/projects/cds-angular/src/cds/_stubs/directive.ts.mustache
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.