@ng-zen/cli 19.2.0-next.1 → 19.2.0-next.3
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 +18 -0
- package/README.md +2 -4
- package/package.json +1 -81
- package/schematics/components/components-generator.js +3 -0
- package/schematics/components/components-generator.js.map +1 -0
- package/{src/schematics → schematics}/components/files/button/button.component.scss +6 -6
- package/{src/schematics → schematics}/components/files/button/button.component.ts +1 -1
- package/schematics/components/index.js +11 -0
- package/schematics/components/index.js.map +1 -0
- package/schematics/ng-add/index.js +12 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/ng-zen-generator.js +3 -0
- package/schematics/ng-add/ng-zen-generator.js.map +1 -0
- package/types/generator-schema-base.interface.js +3 -0
- package/types/generator-schema-base.interface.js.map +1 -0
- package/types/index.js +5 -0
- package/types/index.js.map +1 -0
- package/types/schematics-folder.type.js +3 -0
- package/types/schematics-folder.type.js.map +1 -0
- package/utils/apply-file-template.util.js +23 -0
- package/utils/apply-file-template.util.js.map +1 -0
- package/utils/index.js +5 -0
- package/utils/index.js.map +1 -0
- package/.commitlintrc +0 -3
- package/.editorconfig +0 -17
- package/.github/dependabot.yml +0 -18
- package/.github/workflows/ci.yml +0 -112
- package/.github/workflows/deploy.yml +0 -41
- package/.github/workflows/release.yml +0 -66
- package/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -1
- package/.nanostagedrc +0 -5
- package/.prettierignore +0 -3
- package/.prettierrc +0 -23
- package/.releaserc.json +0 -67
- package/.storybook/main.ts +0 -17
- package/.storybook/preview.ts +0 -13
- package/.storybook/stories/pages/1 README.mdx +0 -9
- package/.storybook/stories/pages/2 License.mdx +0 -9
- package/.storybook/stories/pages/3 CHANGELOG.mdx +0 -9
- package/.storybook/tsconfig.json +0 -10
- package/.storybook/typings.d.ts +0 -4
- package/.stylelintrc.json +0 -3
- package/CODE_OF_CONDUCT.md +0 -30
- package/CONTRIBUTING.md +0 -54
- package/DEVELOPMENT.md +0 -138
- package/angular.json +0 -66
- package/eslint.config.js +0 -73
- package/jest.config.ts +0 -20
- package/tsconfig.json +0 -31
- package/tsconfig.lib.json +0 -11
- package/tsconfig.schematics.json +0 -30
- package/tsconfig.spec.json +0 -9
- /package/{src/schematics → schematics}/collection.json +0 -0
- /package/{src/schematics → schematics}/components/components-generator.ts +0 -0
- /package/{src/schematics → schematics}/components/files/avatar/avatar.component.scss +0 -0
- /package/{src/schematics → schematics}/components/files/avatar/avatar.component.spec.ts +0 -0
- /package/{src/schematics → schematics}/components/files/avatar/avatar.component.ts +0 -0
- /package/{src/schematics → schematics}/components/files/avatar/avatar.stories.ts +0 -0
- /package/{src/schematics → schematics}/components/files/avatar/index.ts +0 -0
- /package/{src/schematics → schematics}/components/files/button/button.component.spec.ts +0 -0
- /package/{src/schematics → schematics}/components/files/button/button.stories.ts +0 -0
- /package/{src/schematics → schematics}/components/files/button/index.ts +0 -0
- /package/{src/schematics → schematics}/components/files/checkbox/checkbox.component.scss +0 -0
- /package/{src/schematics → schematics}/components/files/checkbox/checkbox.component.spec.ts +0 -0
- /package/{src/schematics → schematics}/components/files/checkbox/checkbox.component.ts +0 -0
- /package/{src/schematics → schematics}/components/files/checkbox/checkbox.stories.ts +0 -0
- /package/{src/schematics → schematics}/components/files/checkbox/index.ts +0 -0
- /package/{src/schematics → schematics}/components/files/divider/divider.component.scss +0 -0
- /package/{src/schematics → schematics}/components/files/divider/divider.component.spec.ts +0 -0
- /package/{src/schematics → schematics}/components/files/divider/divider.component.ts +0 -0
- /package/{src/schematics → schematics}/components/files/divider/divider.stories.ts +0 -0
- /package/{src/schematics → schematics}/components/files/divider/index.ts +0 -0
- /package/{src/schematics → schematics}/components/files/input/index.ts +0 -0
- /package/{src/schematics → schematics}/components/files/input/input.component.scss +0 -0
- /package/{src/schematics → schematics}/components/files/input/input.component.spec.ts +0 -0
- /package/{src/schematics → schematics}/components/files/input/input.component.ts +0 -0
- /package/{src/schematics → schematics}/components/files/input/input.stories.ts +0 -0
- /package/{src/schematics → schematics}/components/files/switch/index.ts +0 -0
- /package/{src/schematics → schematics}/components/files/switch/switch.component.scss +0 -0
- /package/{src/schematics → schematics}/components/files/switch/switch.component.spec.ts +0 -0
- /package/{src/schematics → schematics}/components/files/switch/switch.component.ts +0 -0
- /package/{src/schematics → schematics}/components/files/switch/switch.stories.ts +0 -0
- /package/{src/schematics → schematics}/components/files/textarea/index.ts +0 -0
- /package/{src/schematics → schematics}/components/files/textarea/textarea.component.scss +0 -0
- /package/{src/schematics → schematics}/components/files/textarea/textarea.component.spec.ts +0 -0
- /package/{src/schematics → schematics}/components/files/textarea/textarea.component.ts +0 -0
- /package/{src/schematics → schematics}/components/files/textarea/textarea.stories.ts +0 -0
- /package/{src/schematics → schematics}/components/index.ts +0 -0
- /package/{src/schematics → schematics}/components/schema.json +0 -0
- /package/{src/schematics → schematics}/components/templates/README.md.template +0 -0
- /package/{src/schematics → schematics}/ng-add/index.ts +0 -0
- /package/{src/schematics → schematics}/ng-add/ng-zen-generator.ts +0 -0
- /package/{src/schematics → schematics}/ng-add/schema.json +0 -0
- /package/{src/types → types}/generator-schema-base.interface.ts +0 -0
- /package/{src/types → types}/index.ts +0 -0
- /package/{src/types → types}/schematics-folder.type.ts +0 -0
- /package/{src/utils → utils}/apply-file-template.util.ts +0 -0
- /package/{src/utils → utils}/index.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# [19.2.0-next.3](https://github.com/kstepien3/ng-zen/compare/v19.2.0-next.2...v19.2.0-next.3) (2025-05-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **button:** update selector to support is() pseudo-class ([#195](https://github.com/kstepien3/ng-zen/issues/195)) ([e85135e](https://github.com/kstepien3/ng-zen/commit/e85135ef45c7a38b5597624254c7b0adae6e4db4))
|
|
7
|
+
|
|
8
|
+
## [19.2.0-next.2](https://github.com/kstepien3/ng-zen/compare/v19.2.0-next.1...v19.2.0-next.2) (2025-05-24)
|
|
9
|
+
|
|
10
|
+
### 🚀 New Features
|
|
11
|
+
|
|
12
|
+
* **button:** add css variables for styling ([#191](https://github.com/kstepien3/ng-zen/issues/191)) ([7278585](https://github.com/kstepien3/ng-zen/commit/7278585c642a01468c2ef85dc39f3e767287ccf7))
|
|
13
|
+
|
|
14
|
+
### 🧹 Chore
|
|
15
|
+
|
|
16
|
+
* **build:** update output directory and release configuration ([#190](https://github.com/kstepien3/ng-zen/issues/190)) ([bae868c](https://github.com/kstepien3/ng-zen/commit/bae868cf00481a685fc02ee73a34ab4b787e9e67))
|
|
17
|
+
* **dependencies:** restore conventional-changelog-conventionalcommits ([#189](https://github.com/kstepien3/ng-zen/issues/189)) ([5afabcb](https://github.com/kstepien3/ng-zen/commit/5afabcb1050da49404ed89a83fee57af1872b729))
|
|
18
|
+
|
|
1
19
|
## 19.2.0-next.1 (2025-05-23)
|
|
2
20
|
|
|
3
21
|
* chore(dependencies): update dependencies (#187) ([7028a9e](https://github.com/kstepien3/ng-zen/commit/7028a9e)), closes [#187](https://github.com/kstepien3/ng-zen/issues/187)
|
package/README.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# @ng-zen/cli
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@ng-zen/cli)
|
|
6
|
-
[](https://www.npmjs.com/package/@ng-zen/cli)
|
|
3
|
+
[](https://github.com/kstepien3/ng-zen/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@ng-zen/cli)
|
|
7
5
|
[](https://github.com/kstepien3/ng-zen/blob/master/LICENSE)
|
|
8
6
|
|
|
9
7
|
[](https://github.com/kstepien3/ng-zen)
|
package/package.json
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-zen/cli",
|
|
3
|
-
"version": "19.2.0-next.
|
|
3
|
+
"version": "19.2.0-next.3",
|
|
4
4
|
"description": "A CLI tool for generating customizable, modern Angular UI components using schematics.",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"ng": "ng",
|
|
7
|
-
"start": "ng serve",
|
|
8
|
-
"build": "ng build",
|
|
9
|
-
"test": "ng test",
|
|
10
|
-
"lint": "ng lint",
|
|
11
|
-
"lint:fix": "ng lint --fix",
|
|
12
|
-
"prepare": "husky",
|
|
13
|
-
"storybook": "ng run cli:storybook",
|
|
14
|
-
"storybook:build": "ng run cli:build-storybook",
|
|
15
|
-
"storybook:doc": "compodoc -e json -p .storybook/tsconfig.json -t",
|
|
16
|
-
"verdaccio": "verdaccio",
|
|
17
|
-
"prepublish:verdaccio": "pnpm unpublish @ng-zen/cli --registry http://localhost:4873 --force && pnpm run build",
|
|
18
|
-
"publish:verdaccio": "cd dist/@ng-zen/cli && npm publish --registry http://localhost:4873/",
|
|
19
|
-
"semantic-release": "semantic-release"
|
|
20
|
-
},
|
|
21
5
|
"license": "BSD-2-Clause",
|
|
22
6
|
"private": false,
|
|
23
7
|
"repository": {
|
|
@@ -58,69 +42,5 @@
|
|
|
58
42
|
"@angular-devkit/core": "^19.2.13",
|
|
59
43
|
"@angular-devkit/schematics": "^19.2.13",
|
|
60
44
|
"tslib": "^2.8.1"
|
|
61
|
-
},
|
|
62
|
-
"devDependencies": {
|
|
63
|
-
"@angular-builders/jest": "^19.0.1",
|
|
64
|
-
"@angular-devkit/architect": "^0.1902.13",
|
|
65
|
-
"@angular-devkit/build-angular": "^19.2.13",
|
|
66
|
-
"@angular-devkit/core": "^19.1.7",
|
|
67
|
-
"@angular/animations": "^19.2.12",
|
|
68
|
-
"@angular/cli": "^19.2.13",
|
|
69
|
-
"@angular/common": "^19.2.12",
|
|
70
|
-
"@angular/compiler": "^19.2.12",
|
|
71
|
-
"@angular/compiler-cli": "^19.2.12",
|
|
72
|
-
"@angular/core": "^19.2.12",
|
|
73
|
-
"@angular/forms": "^19.2.12",
|
|
74
|
-
"@angular/platform-browser": "^19.2.12",
|
|
75
|
-
"@angular/platform-browser-dynamic": "^19.2.12",
|
|
76
|
-
"@angular/router": "^19.2.12",
|
|
77
|
-
"@chromatic-com/storybook": "^3.2.6",
|
|
78
|
-
"@commitlint/cli": "^19.8.1",
|
|
79
|
-
"@commitlint/config-conventional": "^19.8.1",
|
|
80
|
-
"@compodoc/compodoc": "^1.1.26",
|
|
81
|
-
"@eslint/js": "^9.27.0",
|
|
82
|
-
"@semantic-release/changelog": "^6.0.3",
|
|
83
|
-
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
84
|
-
"@semantic-release/git": "^10.0.1",
|
|
85
|
-
"@semantic-release/github": "^11.0.2",
|
|
86
|
-
"@semantic-release/npm": "^12.0.1",
|
|
87
|
-
"@semantic-release/release-notes-generator": "^14.0.3",
|
|
88
|
-
"@storybook/addon-docs": "^8.6.14",
|
|
89
|
-
"@storybook/addon-essentials": "^8.6.14",
|
|
90
|
-
"@storybook/addon-interactions": "^8.6.14",
|
|
91
|
-
"@storybook/addon-links": "^8.6.14",
|
|
92
|
-
"@storybook/addon-onboarding": "^8.6.14",
|
|
93
|
-
"@storybook/angular": "^8.6.14",
|
|
94
|
-
"@storybook/blocks": "^8.6.14",
|
|
95
|
-
"@storybook/test": "^8.6.14",
|
|
96
|
-
"@types/jest": "29.5.14",
|
|
97
|
-
"angular-eslint": "19.4.0",
|
|
98
|
-
"copyfiles": "^2.4.1",
|
|
99
|
-
"cpy": "^11.1.0",
|
|
100
|
-
"eslint": "^9.27.0",
|
|
101
|
-
"eslint-config-prettier": "^10.1.5",
|
|
102
|
-
"eslint-plugin-import": "^2.31.0",
|
|
103
|
-
"eslint-plugin-prettier": "^5.4.0",
|
|
104
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
105
|
-
"eslint-plugin-storybook": "^0.12.0",
|
|
106
|
-
"eslint-plugin-unicorn": "^59.0.1",
|
|
107
|
-
"eslint-plugin-unused-imports": "^4.1.4",
|
|
108
|
-
"execa": "^9.5.3",
|
|
109
|
-
"fs-extra": "^11.3.0",
|
|
110
|
-
"husky": "^9.1.7",
|
|
111
|
-
"jasmine-core": "~5.7.1",
|
|
112
|
-
"jest": "^29.7.0",
|
|
113
|
-
"jest-preset-angular": "^14.5.5",
|
|
114
|
-
"nano-staged": "^0.8.0",
|
|
115
|
-
"ngx-schematic-builder": "^0.2.0",
|
|
116
|
-
"prettier": "^3.5.3",
|
|
117
|
-
"prettier-plugin-organize-attributes": "^1.0.0",
|
|
118
|
-
"rxjs": "~7.8.2",
|
|
119
|
-
"semantic-release": "^24.2.4",
|
|
120
|
-
"storybook": "^8.6.14",
|
|
121
|
-
"stylelint": "^16.19.1",
|
|
122
|
-
"stylelint-config-standard-scss": "^15.0.1",
|
|
123
|
-
"typescript": "~5.8.3",
|
|
124
|
-
"typescript-eslint": "8.32.1"
|
|
125
45
|
}
|
|
126
46
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-generator.js","sourceRoot":"","sources":["../../../../../src/schematics/components/components-generator.ts"],"names":[],"mappings":"","sourcesContent":["import { GeneratorSchemaBase } from '../../types';\n\nexport type ComponentType = 'avatar' | 'button' | 'checkbox' | 'divider' | 'input' | 'switch' | 'textarea';\n\nexport interface ComponentGeneratorSchema extends GeneratorSchemaBase {\n components: ComponentType[];\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
$bg-color-hover:
|
|
2
|
-
$bg-color:
|
|
3
|
-
$color:
|
|
4
|
-
$padding:
|
|
5
|
-
$shadow: 0 2px 4px
|
|
6
|
-
$transition-duration: 0.4s;
|
|
1
|
+
$bg-color-hover: var(--zen-button-bg-color-hover, hsl(0deg 0% 20%));
|
|
2
|
+
$bg-color: var(--zen-button-bg-color, hsl(0deg 0% 0%));
|
|
3
|
+
$color: var(--zen-button-color, hsl(0deg 0% 100%));
|
|
4
|
+
$padding: var(--zen-button-padding, 0.5rem 1rem);
|
|
5
|
+
$shadow: var(--zen-button-shadow, 0 2px 4px hsl(0deg 0% 0% / 10%));
|
|
6
|
+
$transition-duration: var(--zen-transition-duration, 0.4s);
|
|
7
7
|
$outline: var(--zen-outline, 2px solid hsl(200deg 100 50 / 50%));
|
|
8
8
|
|
|
9
9
|
:host {
|
|
@@ -15,7 +15,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
|
15
15
|
*/
|
|
16
16
|
@Component({
|
|
17
17
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
18
|
-
selector: 'button
|
|
18
|
+
selector: ':is(button, a):is([zen-button], [zen-btn])',
|
|
19
19
|
template: `
|
|
20
20
|
<ng-content />
|
|
21
21
|
`,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.componentGenerator = componentGenerator;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
function componentGenerator({ components, ...config }) {
|
|
7
|
+
return () => {
|
|
8
|
+
return (0, schematics_1.chain)((0, utils_1.applyFileTemplateUtil)(components, config));
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schematics/components/index.ts"],"names":[],"mappings":";;AAKA,gDAIC;AATD,2DAAyD;AAEzD,uCAAoD;AAGpD,SAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,GAAG,MAAM,EAA4B;IACpF,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,kBAAK,EAAC,IAAA,6BAAqB,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { chain, Rule } from '@angular-devkit/schematics';\n\nimport { applyFileTemplateUtil } from '../../utils';\nimport { ComponentGeneratorSchema } from './components-generator';\n\nexport function componentGenerator({ components, ...config }: ComponentGeneratorSchema): Rule {\n return () => {\n return chain(applyFileTemplateUtil(components, config));\n };\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ngAdd = ngAdd;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
function ngAdd(options) {
|
|
6
|
+
return (_tree, _context) => {
|
|
7
|
+
_context.logger.info('Adding library to the project');
|
|
8
|
+
// Run other schematics from ng-add
|
|
9
|
+
return (0, schematics_1.chain)([(0, schematics_1.schematic)('component', options)]);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schematics/ng-add/index.ts"],"names":[],"mappings":";;AAIA,sBAOC;AAXD,2DAA4F;AAI5F,SAAgB,KAAK,CAAC,OAA6B;IACjD,OAAO,CAAC,KAAW,EAAE,QAA0B,EAAE,EAAE;QACjD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAEtD,mCAAmC;QACnC,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,sBAAS,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { chain, Rule, schematic, SchematicContext, Tree } from '@angular-devkit/schematics';\n\nimport { NgZenGeneratorSchema } from './ng-zen-generator';\n\nexport function ngAdd(options: NgZenGeneratorSchema): Rule {\n return (_tree: Tree, _context: SchematicContext) => {\n _context.logger.info('Adding library to the project');\n\n // Run other schematics from ng-add\n return chain([schematic('component', options)]);\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-zen-generator.js","sourceRoot":"","sources":["../../../../../src/schematics/ng-add/ng-zen-generator.ts"],"names":[],"mappings":"","sourcesContent":["import { GeneratorSchemaBase } from '../../types';\n\nexport type NgZenGeneratorSchema = GeneratorSchemaBase;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-schema-base.interface.js","sourceRoot":"","sources":["../../../../src/types/generator-schema-base.interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface GeneratorSchemaBase {\n path: string;\n stories: boolean;\n}\n"]}
|
package/types/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,4EAAkD","sourcesContent":["export * from './generator-schema-base.interface';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematics-folder.type.js","sourceRoot":"","sources":["../../../../src/types/schematics-folder.type.ts"],"names":[],"mappings":"","sourcesContent":["import { ComponentType } from '../schematics/components/components-generator';\n\nexport type SchematicsFolder = ComponentType;\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyFileTemplateUtil = applyFileTemplateUtil;
|
|
4
|
+
const core_1 = require("@angular-devkit/core");
|
|
5
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
+
const createTemplateRules = (folder, path) => [
|
|
7
|
+
(0, schematics_1.applyTemplates)({
|
|
8
|
+
name: folder,
|
|
9
|
+
localeDate: new Date().toLocaleString(),
|
|
10
|
+
...core_1.strings,
|
|
11
|
+
}),
|
|
12
|
+
(0, schematics_1.move)((0, core_1.normalize)(`${path}/${folder}`)),
|
|
13
|
+
];
|
|
14
|
+
const getTemplates = (rules) => (0, schematics_1.apply)((0, schematics_1.url)(`./templates`), rules);
|
|
15
|
+
const includeStories = (include) => (0, schematics_1.filter)(filePath => include || !filePath.endsWith('.stories.ts'));
|
|
16
|
+
function applyFileTemplateUtil(folders, config) {
|
|
17
|
+
return folders.map(folder => {
|
|
18
|
+
const RULES = createTemplateRules(folder, config.path);
|
|
19
|
+
const folderSource = (0, schematics_1.apply)((0, schematics_1.url)(`./files/${folder}`), [includeStories(config.stories), ...RULES]);
|
|
20
|
+
return (0, schematics_1.chain)([folderSource, getTemplates(RULES)].map(schematics_1.mergeWith));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=apply-file-template.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-file-template.util.js","sourceRoot":"","sources":["../../../../src/utils/apply-file-template.util.ts"],"names":[],"mappings":";;AAkBA,sDAQC;AA1BD,+CAA0D;AAC1D,2DAA8G;AAK9G,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAE,IAAY,EAAU,EAAE,CAAC;IACpE,IAAA,2BAAc,EAAC;QACb,IAAI,EAAE,MAAM;QACZ,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,cAAc,EAAE;QACvC,GAAG,cAAO;KACX,CAAC;IACF,IAAA,iBAAI,EAAC,IAAA,gBAAS,EAAC,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC,CAAC;CACrC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,aAAa,CAAC,EAAE,KAAK,CAAC,CAAC;AACzE,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAE,EAAE,CAAC,IAAA,mBAAM,EAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAE9G,SAAgB,qBAAqB,CAAC,OAA2B,EAAE,MAA2B;IAC5F,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QAC1B,MAAM,KAAK,GAAG,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAEvD,MAAM,YAAY,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,WAAW,MAAM,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;QAEjG,OAAO,IAAA,kBAAK,EAAC,CAAC,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,sBAAS,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { normalize, strings } from '@angular-devkit/core';\nimport { apply, applyTemplates, chain, filter, mergeWith, move, Rule, url } from '@angular-devkit/schematics';\n\nimport { GeneratorSchemaBase } from '../types';\nimport { SchematicsFolder } from '../types/schematics-folder.type';\n\nconst createTemplateRules = (folder: string, path: string): Rule[] => [\n applyTemplates({\n name: folder,\n localeDate: new Date().toLocaleString(),\n ...strings,\n }),\n move(normalize(`${path}/${folder}`)),\n];\n\nconst getTemplates = (rules: Rule[]) => apply(url(`./templates`), rules);\nconst includeStories = (include: boolean) => filter(filePath => include || !filePath.endsWith('.stories.ts'));\n\nexport function applyFileTemplateUtil(folders: SchematicsFolder[], config: GeneratorSchemaBase): Rule[] {\n return folders.map(folder => {\n const RULES = createTemplateRules(folder, config.path);\n\n const folderSource = apply(url(`./files/${folder}`), [includeStories(config.stories), ...RULES]);\n\n return chain([folderSource, getTemplates(RULES)].map(mergeWith));\n });\n}\n"]}
|
package/utils/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,qEAA2C","sourcesContent":["export * from './apply-file-template.util';\n"]}
|
package/.commitlintrc
DELETED
package/.editorconfig
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Editor configuration, see https://editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
[*]
|
|
5
|
-
charset = utf-8
|
|
6
|
-
indent_style = space
|
|
7
|
-
indent_size = 2
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
|
|
11
|
-
[*.ts]
|
|
12
|
-
quote_type = single
|
|
13
|
-
ij_typescript_use_double_quotes = false
|
|
14
|
-
|
|
15
|
-
[*.md]
|
|
16
|
-
max_line_length = off
|
|
17
|
-
trim_trailing_whitespace = false
|
package/.github/dependabot.yml
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: "npm"
|
|
4
|
-
directory: "/"
|
|
5
|
-
target-branch: develop
|
|
6
|
-
schedule:
|
|
7
|
-
interval: "weekly"
|
|
8
|
-
day: sunday
|
|
9
|
-
- package-ecosystem: "github-actions"
|
|
10
|
-
target-branch: develop
|
|
11
|
-
directory: "/"
|
|
12
|
-
schedule:
|
|
13
|
-
interval: "weekly"
|
|
14
|
-
day: sunday
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: [master, develop, next]
|
|
6
|
-
|
|
7
|
-
env:
|
|
8
|
-
NODE_VERSION: 22
|
|
9
|
-
RETENTION_DAYS: 30
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
install:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
outputs:
|
|
15
|
-
cache-key: ${{ steps.cache-key.outputs.cache-key }}
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v4
|
|
18
|
-
- name: Enable Corepack
|
|
19
|
-
run: corepack enable
|
|
20
|
-
- uses: pnpm/action-setup@v4
|
|
21
|
-
- uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
24
|
-
cache: pnpm
|
|
25
|
-
- id: cache-key
|
|
26
|
-
run: |
|
|
27
|
-
CACHE_KEY="${{ runner.os }}-node-${{ env.NODE_VERSION }}-pnpm-cache-$(sha256sum pnpm-lock.yaml | cut -d' ' -f1)"
|
|
28
|
-
echo "cache-key=$CACHE_KEY" >> $GITHUB_OUTPUT
|
|
29
|
-
- uses: actions/cache@v4
|
|
30
|
-
id: pnpm-cache
|
|
31
|
-
with:
|
|
32
|
-
path: |
|
|
33
|
-
node_modules
|
|
34
|
-
~/.pnpm-store
|
|
35
|
-
key: ${{ steps.cache-key.outputs.cache-key }}
|
|
36
|
-
restore-keys: |
|
|
37
|
-
${{ runner.os }}-node-${{ env.NODE_VERSION }}-pnpm-cache-
|
|
38
|
-
- run: pnpm install --frozen-lockfile
|
|
39
|
-
|
|
40
|
-
lint:
|
|
41
|
-
needs: install
|
|
42
|
-
runs-on: ubuntu-latest
|
|
43
|
-
steps:
|
|
44
|
-
- uses: actions/checkout@v4
|
|
45
|
-
- name: Enable Corepack
|
|
46
|
-
run: corepack enable
|
|
47
|
-
- uses: pnpm/action-setup@v4
|
|
48
|
-
- uses: actions/setup-node@v4
|
|
49
|
-
with:
|
|
50
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
51
|
-
- uses: actions/cache@v4
|
|
52
|
-
with:
|
|
53
|
-
path: |
|
|
54
|
-
node_modules
|
|
55
|
-
~/.pnpm-store
|
|
56
|
-
key: ${{ needs.install.outputs.cache-key }}
|
|
57
|
-
- run: pnpm run lint
|
|
58
|
-
- uses: actions/upload-artifact@v4
|
|
59
|
-
if: always()
|
|
60
|
-
with:
|
|
61
|
-
name: lint-report
|
|
62
|
-
path: lint-report/
|
|
63
|
-
retention-days: ${{ env.RETENTION_DAYS }}
|
|
64
|
-
test:
|
|
65
|
-
needs: install
|
|
66
|
-
runs-on: ubuntu-latest
|
|
67
|
-
steps:
|
|
68
|
-
- uses: actions/checkout@v4
|
|
69
|
-
- uses: pnpm/action-setup@v4
|
|
70
|
-
with:
|
|
71
|
-
version: ${{ env.PNPM_VERSION }}
|
|
72
|
-
- uses: actions/setup-node@v4
|
|
73
|
-
with:
|
|
74
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
75
|
-
- uses: actions/cache@v4
|
|
76
|
-
with:
|
|
77
|
-
path: |
|
|
78
|
-
node_modules
|
|
79
|
-
~/.pnpm-store
|
|
80
|
-
key: ${{ needs.install.outputs.cache-key }}
|
|
81
|
-
- run: pnpm run test
|
|
82
|
-
- uses: actions/upload-artifact@v4
|
|
83
|
-
if: always()
|
|
84
|
-
with:
|
|
85
|
-
name: test-report
|
|
86
|
-
path: test-report/
|
|
87
|
-
retention-days: ${{ env.RETENTION_DAYS }}
|
|
88
|
-
|
|
89
|
-
build:
|
|
90
|
-
needs: [install, lint, test]
|
|
91
|
-
runs-on: ubuntu-latest
|
|
92
|
-
steps:
|
|
93
|
-
- uses: actions/checkout@v4
|
|
94
|
-
- uses: pnpm/action-setup@v4
|
|
95
|
-
with:
|
|
96
|
-
version: ${{ env.PNPM_VERSION }}
|
|
97
|
-
- uses: actions/setup-node@v4
|
|
98
|
-
with:
|
|
99
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
100
|
-
- uses: actions/cache@v4
|
|
101
|
-
with:
|
|
102
|
-
path: |
|
|
103
|
-
node_modules
|
|
104
|
-
~/.pnpm-store
|
|
105
|
-
key: ${{ needs.install.outputs.cache-key }}
|
|
106
|
-
- run: pnpm run build
|
|
107
|
-
- uses: actions/upload-artifact@v4
|
|
108
|
-
if: always()
|
|
109
|
-
with:
|
|
110
|
-
name: build-report
|
|
111
|
-
path: build-report/
|
|
112
|
-
retention-days: ${{ env.RETENTION_DAYS }}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
name: Deploy Storybook to github pages
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- 'v*.*.*'
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
|
|
9
|
-
env:
|
|
10
|
-
NODE_VERSION: 22
|
|
11
|
-
PNPM_VERSION: 10.0.0
|
|
12
|
-
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
pages: write
|
|
16
|
-
id-token: write
|
|
17
|
-
|
|
18
|
-
jobs:
|
|
19
|
-
deploy:
|
|
20
|
-
runs-on: ubuntu-latest
|
|
21
|
-
steps:
|
|
22
|
-
- name: Checkout code
|
|
23
|
-
uses: actions/checkout@v4
|
|
24
|
-
- name: Enable Corepack
|
|
25
|
-
run: corepack enable
|
|
26
|
-
- name: Setup pnpm
|
|
27
|
-
uses: pnpm/action-setup@v4
|
|
28
|
-
with:
|
|
29
|
-
version: ${{ env.PNPM_VERSION }}
|
|
30
|
-
- name: Setup Node.js
|
|
31
|
-
uses: actions/setup-node@v4
|
|
32
|
-
with:
|
|
33
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
34
|
-
cache: 'pnpm'
|
|
35
|
-
- name: Build and deploy Storybook
|
|
36
|
-
id: build-publish
|
|
37
|
-
uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
|
|
38
|
-
with:
|
|
39
|
-
install_command: pnpm install --frozen-lockfile
|
|
40
|
-
build_command: pnpm run storybook:build
|
|
41
|
-
path: dist/storybook
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
- next
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
env:
|
|
11
|
-
NODE_VERSION: 22
|
|
12
|
-
PNPM_VERSION: 10.0.0
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
release:
|
|
16
|
-
name: Build, Test and Release
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
|
|
19
|
-
steps:
|
|
20
|
-
- name: Checkout code
|
|
21
|
-
uses: actions/checkout@v4
|
|
22
|
-
with:
|
|
23
|
-
persist-credentials: false
|
|
24
|
-
fetch-depth: 0
|
|
25
|
-
fetch-tags: true
|
|
26
|
-
- name: Enable Corepack
|
|
27
|
-
run: corepack enable
|
|
28
|
-
|
|
29
|
-
- name: Setup pnpm
|
|
30
|
-
uses: pnpm/action-setup@v4
|
|
31
|
-
with:
|
|
32
|
-
version: ${{ env.PNPM_VERSION }}
|
|
33
|
-
- name: Setup Node.js
|
|
34
|
-
uses: actions/setup-node@v4
|
|
35
|
-
with:
|
|
36
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
37
|
-
- name: Get pnpm cache directory
|
|
38
|
-
id: pnpm-cache-dir
|
|
39
|
-
shell: bash
|
|
40
|
-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
|
|
41
|
-
- name: Generate cache key
|
|
42
|
-
id: cache-key
|
|
43
|
-
shell: bash
|
|
44
|
-
run: |
|
|
45
|
-
echo "key=node-v${{ env.NODE_VERSION }}-pnpm-v${{ env.PNPM_VERSION }}-lock-${{ hashFiles('**/pnpm-lock.yaml') }}" >> $GITHUB_OUTPUT
|
|
46
|
-
echo "restore_key=node-v${{ env.NODE_VERSION }}-pnpm-v${{ env.PNPM_VERSION }}-lock-" >> $GITHUB_OUTPUT
|
|
47
|
-
- name: Setup pnpm cache
|
|
48
|
-
uses: actions/cache@v4
|
|
49
|
-
with:
|
|
50
|
-
path: ${{ steps.pnpm-cache-dir.outputs.STORE_PATH }}
|
|
51
|
-
key: ${{ steps.cache-key.outputs.key }}
|
|
52
|
-
restore-keys: ${{ steps.cache-key.outputs.restore_key }}
|
|
53
|
-
- name: Install dependencies
|
|
54
|
-
run: pnpm install --frozen-lockfile
|
|
55
|
-
- name: Run linter
|
|
56
|
-
run: pnpm run lint
|
|
57
|
-
- name: Run tests
|
|
58
|
-
run: pnpm run test
|
|
59
|
-
- name: Build project
|
|
60
|
-
run: pnpm run build
|
|
61
|
-
- name: Run semantic-release
|
|
62
|
-
run: pnpm run semantic-release --debug
|
|
63
|
-
env:
|
|
64
|
-
HUSKY: 0
|
|
65
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
66
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.husky/commit-msg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
commitlint --edit ${1}
|
package/.husky/pre-commit
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nano-staged
|
package/.nanostagedrc
DELETED
package/.prettierignore
DELETED
package/.prettierrc
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"plugins": [
|
|
3
|
-
"prettier-plugin-organize-attributes"
|
|
4
|
-
],
|
|
5
|
-
"tabWidth": 2,
|
|
6
|
-
"useTabs": false,
|
|
7
|
-
"singleQuote": true,
|
|
8
|
-
"semi": true,
|
|
9
|
-
"bracketSpacing": true,
|
|
10
|
-
"arrowParens": "avoid",
|
|
11
|
-
"trailingComma": "es5",
|
|
12
|
-
"bracketSameLine": false,
|
|
13
|
-
"htmlWhitespaceSensitivity": "ignore",
|
|
14
|
-
"printWidth": 120,
|
|
15
|
-
"endOfLine": "auto",
|
|
16
|
-
"attributeGroups": [
|
|
17
|
-
"$ANGULAR_STRUCTURAL_DIRECTIVE",
|
|
18
|
-
"$ANGULAR_INPUT",
|
|
19
|
-
"$ANGULAR_OUTPUT",
|
|
20
|
-
"$ANGULAR_TWO_WAY_BINDING"
|
|
21
|
-
],
|
|
22
|
-
"attributeSort": "ASC"
|
|
23
|
-
}
|