@smartbit4all/ng-client 1.0.5 → 1.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^13.2.0",
@@ -0,0 +1,26 @@
1
+ import {
2
+ Rule,
3
+ apply,
4
+ applyTemplates,
5
+ chain,
6
+ mergeWith,
7
+ move,
8
+ url,
9
+ } from "@angular-devkit/schematics";
10
+ import { SmartComponentSchema } from "./smart-component.schema";
11
+ import { normalize, strings } from "@angular-devkit/core";
12
+
13
+ export function smartComponentGenerator(options: SmartComponentSchema): Rule {
14
+ return () => {
15
+ const templateSource = apply(url("./templates"), [
16
+ applyTemplates({
17
+ classify: strings.classify,
18
+ dasherize: strings.dasherize,
19
+ name: options.name,
20
+ }),
21
+ move(normalize(`/${options.path}/${strings.dasherize(options.name)}`)),
22
+ ]);
23
+
24
+ return chain([mergeWith(templateSource)]);
25
+ };
26
+ }
@@ -0,0 +1,4 @@
1
+ export interface SmartComponentSchema {
2
+ name: string;
3
+ path: string;
4
+ }
index b2c6896..de6d209 100644
Binary file