@ronas-it/nx-generators 0.10.3 → 0.10.5
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/README.md +10 -1
- package/package.json +4 -3
- package/src/generators/code-checks/config.d.ts +18 -0
- package/src/generators/code-checks/config.js +20 -0
- package/src/generators/code-checks/config.js.map +1 -0
- package/src/generators/code-checks/files/.eslintrc.json.template +173 -1
- package/src/generators/code-checks/generator.d.ts +4 -0
- package/src/generators/code-checks/generator.js +53 -0
- package/src/generators/code-checks/generator.js.map +1 -0
- package/src/generators/code-checks/scripts.d.ts +6 -0
- package/src/generators/code-checks/scripts.js +8 -0
- package/src/generators/code-checks/scripts.js.map +1 -0
- package/src/generators/entity-api/generator.d.ts +4 -0
- package/src/generators/entity-api/generator.js +87 -0
- package/src/generators/entity-api/generator.js.map +1 -0
- package/src/generators/expo-app/generator.d.ts +4 -0
- package/src/generators/expo-app/generator.js +93 -0
- package/src/generators/expo-app/generator.js.map +1 -0
- package/src/generators/expo-app/scripts.d.ts +13 -0
- package/src/generators/expo-app/scripts.js +15 -0
- package/src/generators/expo-app/scripts.js.map +1 -0
- package/src/generators/form/generator.d.ts +4 -0
- package/src/generators/form/generator.js +55 -0
- package/src/generators/form/generator.js.map +1 -0
- package/src/generators/form/utils/add-form-usage.d.ts +1 -0
- package/src/generators/form/utils/add-form-usage.js +71 -0
- package/src/generators/form/utils/add-form-usage.js.map +1 -0
- package/src/generators/form/utils/get-app-name.d.ts +1 -0
- package/src/generators/form/utils/get-app-name.js +8 -0
- package/src/generators/form/utils/get-app-name.js.map +1 -0
- package/src/generators/form/utils/get-form-utils-directory.d.ts +2 -0
- package/src/generators/form/utils/get-form-utils-directory.js +35 -0
- package/src/generators/form/utils/get-form-utils-directory.js.map +1 -0
- package/src/generators/form/utils/index.js +8 -0
- package/src/generators/form/utils/index.js.map +1 -0
- package/src/generators/form/utils/update-index.d.ts +2 -0
- package/src/generators/form/utils/update-index.js +18 -0
- package/src/generators/form/utils/update-index.js.map +1 -0
- package/src/generators/lib-move/generator.d.ts +4 -0
- package/src/generators/lib-move/generator.js +37 -0
- package/src/generators/lib-move/generator.js.map +1 -0
- package/src/generators/lib-remove/generator.d.ts +4 -0
- package/src/generators/lib-remove/generator.js +22 -0
- package/src/generators/lib-remove/generator.js.map +1 -0
- package/src/generators/lib-rename/generator.d.ts +4 -0
- package/src/generators/lib-rename/generator.js +22 -0
- package/src/generators/lib-rename/generator.js.map +1 -0
- package/src/generators/lib-tags/generator.d.ts +4 -0
- package/src/generators/lib-tags/generator.js +56 -0
- package/src/generators/lib-tags/generator.js.map +1 -0
- package/src/generators/lib-tags/interfaces/context.d.ts +8 -0
- package/src/generators/lib-tags/interfaces/context.js +3 -0
- package/src/generators/lib-tags/interfaces/context.js.map +1 -0
- package/src/generators/lib-tags/interfaces/index.js +6 -0
- package/src/generators/lib-tags/interfaces/index.js.map +1 -0
- package/src/generators/lib-tags/interfaces/{verify-tag-config.ts → verify-tag-config.d.ts} +6 -7
- package/src/generators/lib-tags/interfaces/verify-tag-config.js +3 -0
- package/src/generators/lib-tags/interfaces/verify-tag-config.js.map +1 -0
- package/src/generators/lib-tags/types/index.js +5 -0
- package/src/generators/lib-tags/types/index.js.map +1 -0
- package/src/generators/lib-tags/types/tag.js +3 -0
- package/src/generators/lib-tags/types/tag.js.map +1 -0
- package/src/generators/lib-tags/utils/check-lib-tags.d.ts +4 -0
- package/src/generators/lib-tags/utils/check-lib-tags.js +113 -0
- package/src/generators/lib-tags/utils/check-lib-tags.js.map +1 -0
- package/src/generators/lib-tags/utils/index.js +5 -0
- package/src/generators/lib-tags/utils/index.js.map +1 -0
- package/src/generators/next-app/generator.d.ts +4 -0
- package/src/generators/next-app/generator.js +71 -0
- package/src/generators/next-app/generator.js.map +1 -0
- package/src/generators/react-component/generator.d.ts +4 -0
- package/src/generators/react-component/generator.js +60 -0
- package/src/generators/react-component/generator.js.map +1 -0
- package/src/generators/react-lib/generator.d.ts +4 -0
- package/src/generators/react-lib/generator.js +61 -0
- package/src/generators/react-lib/generator.js.map +1 -0
- package/src/generators/repo-config/generator.d.ts +3 -0
- package/src/generators/repo-config/generator.js +36 -0
- package/src/generators/repo-config/generator.js.map +1 -0
- package/src/generators/repo-config/scripts.d.ts +4 -0
- package/src/generators/repo-config/scripts.js +6 -0
- package/src/generators/repo-config/scripts.js.map +1 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -0
- package/src/shared/dependencies.d.ts +73 -0
- package/src/shared/dependencies.js +79 -0
- package/src/shared/dependencies.js.map +1 -0
- package/src/shared/enums/base-generator-type.d.ts +4 -0
- package/src/shared/enums/base-generator-type.js +9 -0
- package/src/shared/enums/base-generator-type.js.map +1 -0
- package/src/shared/enums/index.js +5 -0
- package/src/shared/enums/index.js.map +1 -0
- package/src/shared/generators/api-client/generator.d.ts +6 -0
- package/src/shared/generators/api-client/generator.js +37 -0
- package/src/shared/generators/api-client/generator.js.map +1 -0
- package/src/shared/generators/api-client/index.js +5 -0
- package/src/shared/generators/api-client/index.js.map +1 -0
- package/src/shared/generators/app-env/generator.d.ts +8 -0
- package/src/shared/generators/app-env/generator.js +28 -0
- package/src/shared/generators/app-env/generator.js.map +1 -0
- package/src/shared/generators/app-env/index.js +5 -0
- package/src/shared/generators/app-env/index.js.map +1 -0
- package/src/shared/generators/auth/generator.d.ts +4 -0
- package/src/shared/generators/auth/generator.js +82 -0
- package/src/shared/generators/auth/generator.js.map +1 -0
- package/src/shared/generators/auth/index.js +5 -0
- package/src/shared/generators/auth/index.js.map +1 -0
- package/src/shared/generators/form-utils/generator.d.ts +5 -0
- package/src/shared/generators/form-utils/generator.js +24 -0
- package/src/shared/generators/form-utils/generator.js.map +1 -0
- package/src/shared/generators/form-utils/index.js +5 -0
- package/src/shared/generators/form-utils/index.js.map +1 -0
- package/src/shared/generators/index.js +12 -0
- package/src/shared/generators/index.js.map +1 -0
- package/src/shared/generators/rn-styles/generator.d.ts +6 -0
- package/src/shared/generators/rn-styles/generator.js +36 -0
- package/src/shared/generators/rn-styles/generator.js.map +1 -0
- package/src/shared/generators/rn-styles/index.js +5 -0
- package/src/shared/generators/rn-styles/index.js.map +1 -0
- package/src/shared/generators/storage/generator.d.ts +6 -0
- package/src/shared/generators/storage/generator.js +27 -0
- package/src/shared/generators/storage/generator.js.map +1 -0
- package/src/shared/generators/storage/index.js +5 -0
- package/src/shared/generators/storage/index.js.map +1 -0
- package/src/shared/generators/store/generator.d.ts +4 -0
- package/src/shared/generators/store/generator.js +36 -0
- package/src/shared/generators/store/generator.js.map +1 -0
- package/src/shared/generators/store/index.js +5 -0
- package/src/shared/generators/store/index.js.map +1 -0
- package/src/shared/generators/ui-kitten/generator.d.ts +6 -0
- package/src/shared/generators/ui-kitten/generator.js +40 -0
- package/src/shared/generators/ui-kitten/generator.js.map +1 -0
- package/src/shared/generators/ui-kitten/index.js +5 -0
- package/src/shared/generators/ui-kitten/index.js.map +1 -0
- package/src/shared/templates/config-template.json +2 -12
- package/src/shared/utils/cli-utils.d.ts +31 -0
- package/src/shared/utils/cli-utils.js +129 -0
- package/src/shared/utils/cli-utils.js.map +1 -0
- package/src/shared/utils/config-utils.d.ts +19 -0
- package/src/shared/utils/config-utils.js +124 -0
- package/src/shared/utils/config-utils.js.map +1 -0
- package/src/shared/utils/constants.d.ts +3 -0
- package/src/shared/utils/constants.js +7 -0
- package/src/shared/utils/constants.js.map +1 -0
- package/src/shared/utils/dynamic-import.d.ts +1 -0
- package/src/shared/utils/dynamic-import.js +5 -0
- package/src/shared/utils/dynamic-import.js.map +1 -0
- package/src/shared/utils/format-utils.d.ts +4 -0
- package/src/shared/utils/format-utils.js +18 -0
- package/src/shared/utils/format-utils.js.map +1 -0
- package/src/shared/utils/get-lib-directory-name.d.ts +1 -0
- package/src/shared/utils/get-lib-directory-name.js +15 -0
- package/src/shared/utils/get-lib-directory-name.js.map +1 -0
- package/src/shared/utils/index.js +11 -0
- package/src/shared/utils/index.js.map +1 -0
- package/src/shared/utils/ts-utils.d.ts +2 -0
- package/src/shared/utils/ts-utils.js +22 -0
- package/src/shared/utils/ts-utils.js.map +1 -0
- package/.eslintrc.json +0 -37
- package/jest.config.ts +0 -10
- package/project.json +0 -61
- package/src/generators/code-checks/config.ts +0 -17
- package/src/generators/code-checks/generator.ts +0 -72
- package/src/generators/code-checks/scripts.ts +0 -5
- package/src/generators/entity-api/generator.ts +0 -127
- package/src/generators/expo-app/generator.ts +0 -152
- package/src/generators/expo-app/scripts.ts +0 -12
- package/src/generators/form/generator.ts +0 -53
- package/src/generators/form/utils/add-form-usage.ts +0 -86
- package/src/generators/form/utils/get-app-name.ts +0 -3
- package/src/generators/form/utils/get-form-utils-directory.ts +0 -46
- package/src/generators/form/utils/update-index.ts +0 -14
- package/src/generators/lib-move/generator.ts +0 -57
- package/src/generators/lib-remove/generator.ts +0 -25
- package/src/generators/lib-rename/generator.ts +0 -25
- package/src/generators/lib-tags/generator.ts +0 -68
- package/src/generators/lib-tags/interfaces/context.ts +0 -9
- package/src/generators/lib-tags/utils/check-lib-tags.ts +0 -143
- package/src/generators/next-app/generator.ts +0 -99
- package/src/generators/react-component/generator.ts +0 -80
- package/src/generators/react-lib/generator.ts +0 -86
- package/src/generators/repo-config/generator.ts +0 -44
- package/src/generators/repo-config/scripts.ts +0 -3
- package/src/shared/dependencies.ts +0 -76
- package/src/shared/enums/base-generator-type.ts +0 -4
- package/src/shared/generators/api-client/generator.ts +0 -49
- package/src/shared/generators/app-env/generator.ts +0 -37
- package/src/shared/generators/auth/generator.ts +0 -107
- package/src/shared/generators/form-utils/generator.ts +0 -23
- package/src/shared/generators/rn-styles/generator.ts +0 -49
- package/src/shared/generators/storage/generator.ts +0 -34
- package/src/shared/generators/store/generator.ts +0 -48
- package/src/shared/generators/ui-kitten/generator.ts +0 -55
- package/src/shared/utils/cli-utils.ts +0 -149
- package/src/shared/utils/config-utils.ts +0 -146
- package/src/shared/utils/constants.ts +0 -3
- package/src/shared/utils/dynamic-import.ts +0 -4
- package/src/shared/utils/format-utils.ts +0 -16
- package/src/shared/utils/get-lib-directory-name.ts +0 -12
- package/src/shared/utils/ts-utils.ts +0 -17
- package/tsconfig.json +0 -16
- package/tsconfig.lib.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/src/generators/form/utils/{index.ts → index.d.ts} +0 -0
- /package/src/generators/lib-tags/interfaces/{index.ts → index.d.ts} +0 -0
- /package/src/generators/lib-tags/types/{index.ts → index.d.ts} +0 -0
- /package/src/generators/lib-tags/types/{tag.ts → tag.d.ts} +0 -0
- /package/src/generators/lib-tags/utils/{index.ts → index.d.ts} +0 -0
- /package/src/{index.ts → index.d.ts} +0 -0
- /package/src/shared/enums/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/api-client/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/app-env/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/auth/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/form-utils/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/rn-styles/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/storage/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/store/{index.ts → index.d.ts} +0 -0
- /package/src/shared/generators/ui-kitten/{index.ts → index.d.ts} +0 -0
- /package/src/shared/utils/{index.ts → index.d.ts} +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { Constraint } from '../../../shared/utils';
|
|
3
|
-
|
|
4
|
-
export interface LibTagsContext {
|
|
5
|
-
config: Record<string, any>;
|
|
6
|
-
rules: Array<Constraint>;
|
|
7
|
-
log: (message: any, ...optionalParams: Array<any>) => void;
|
|
8
|
-
reload: (tree: Tree) => void;
|
|
9
|
-
}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { ProjectConfiguration, Tree, readProjectConfiguration, updateProjectConfiguration } from '@nx/devkit';
|
|
2
|
-
import { addNxAppTag, addNxScopeTag, constants } from '../../../shared/utils';
|
|
3
|
-
import { LibTagsContext, VerifyTagConfig } from '../interfaces';
|
|
4
|
-
import { TagType } from '../types';
|
|
5
|
-
|
|
6
|
-
const getTagFromLibPath = (libPath: string, type: TagType): string => {
|
|
7
|
-
const projectAppTag = libPath.split('/')[1];
|
|
8
|
-
|
|
9
|
-
switch (type) {
|
|
10
|
-
case 'app':
|
|
11
|
-
return projectAppTag;
|
|
12
|
-
case 'scope':
|
|
13
|
-
return projectAppTag === constants.sharedValue ? constants.sharedValue : libPath.split('/')[2];
|
|
14
|
-
case 'type':
|
|
15
|
-
return projectAppTag === constants.sharedValue ? libPath.split('/')[2] : libPath.split('/')[3];
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const verifyLibraryTag = ({
|
|
20
|
-
project,
|
|
21
|
-
tree,
|
|
22
|
-
tag,
|
|
23
|
-
tagType,
|
|
24
|
-
context,
|
|
25
|
-
ruleNotFoundCallback
|
|
26
|
-
}: VerifyTagConfig): void => {
|
|
27
|
-
const defaultRuleNotFoundCallback = (): void => {
|
|
28
|
-
throw new Error(`Missing ${tagType} tag rule for ${tag}. Please add it to the ESLint config file.`);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
if (tag) {
|
|
32
|
-
const tagRule = context.rules.find((rule) => rule.sourceTag === tag);
|
|
33
|
-
|
|
34
|
-
if (!tagRule) {
|
|
35
|
-
const callback = ruleNotFoundCallback || defaultRuleNotFoundCallback;
|
|
36
|
-
|
|
37
|
-
callback();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const tagFromLibPath = getTagFromLibPath(project.root, tagType);
|
|
41
|
-
const isInvalidTag = tag !== `${tagType}:${tagFromLibPath}`;
|
|
42
|
-
|
|
43
|
-
if (isInvalidTag) {
|
|
44
|
-
context.log(`Invalid tag ${tag}. Updating...\n`);
|
|
45
|
-
|
|
46
|
-
project = readProjectConfiguration(tree, project.name as string);
|
|
47
|
-
|
|
48
|
-
const filteredTags = project.tags?.filter((item) => item !== tag) || [];
|
|
49
|
-
|
|
50
|
-
project.tags = [...filteredTags, `${tagType}:${tagFromLibPath}`];
|
|
51
|
-
|
|
52
|
-
updateProjectConfiguration(tree, project.name as string, project);
|
|
53
|
-
|
|
54
|
-
if (tagType === 'scope') {
|
|
55
|
-
addNxScopeTag(tree, tagFromLibPath);
|
|
56
|
-
context.reload(tree);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
verifyLibraryTag({
|
|
60
|
-
project,
|
|
61
|
-
tree,
|
|
62
|
-
tag:`${tagType}:${tagFromLibPath}`,
|
|
63
|
-
tagType,
|
|
64
|
-
context
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
} else {
|
|
68
|
-
context.log(`Missing ${tagType} tag for ${project.name}. Adding...`);
|
|
69
|
-
|
|
70
|
-
project = readProjectConfiguration(tree, project.name as string);
|
|
71
|
-
|
|
72
|
-
const tag = getTagFromLibPath(project.root, tagType);
|
|
73
|
-
|
|
74
|
-
if (tagType === 'type') {
|
|
75
|
-
const typeTagRule = context.rules.find((rule) => rule.sourceTag === `type:${tag}`);
|
|
76
|
-
|
|
77
|
-
if (!typeTagRule) {
|
|
78
|
-
throw new Error(`Missing type tag rule for ${tag}. Please add it to the ESLint config file.`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
updateProjectConfiguration(tree, project.name as string, { ...project, tags: [...(project.tags || []), `${tagType}:${tag}`] });
|
|
83
|
-
|
|
84
|
-
if (tagType === 'scope') {
|
|
85
|
-
addNxScopeTag(tree, tag);
|
|
86
|
-
context.reload(tree);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export const checkApplicationTags = (project: ProjectConfiguration, tree: Tree, context: LibTagsContext): void => {
|
|
92
|
-
const { tags } = project;
|
|
93
|
-
const appTag = tags?.find((tag) => tag.startsWith('app:'));
|
|
94
|
-
const hasTypeTag = tags?.includes('type:app');
|
|
95
|
-
|
|
96
|
-
if (appTag) {
|
|
97
|
-
const appTagRule = context.rules.find((rule) => rule.sourceTag === appTag);
|
|
98
|
-
|
|
99
|
-
if (!appTagRule) {
|
|
100
|
-
context.log(`Missing app tag rule for ${appTag}. Adding...\n`);
|
|
101
|
-
addNxAppTag(tree, appTag.replace('app:', ''));
|
|
102
|
-
context.reload(tree);
|
|
103
|
-
}
|
|
104
|
-
} else {
|
|
105
|
-
context.log(`Missing app tag for ${project.name}. Adding...`);
|
|
106
|
-
|
|
107
|
-
const projectAppTag = project.root.split('/').pop() as string;
|
|
108
|
-
|
|
109
|
-
updateProjectConfiguration(tree, project.name as string, { ...project, tags: [...(project.tags || []), `app:${projectAppTag}`] });
|
|
110
|
-
addNxAppTag(tree, projectAppTag);
|
|
111
|
-
context.reload(tree);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (!hasTypeTag) {
|
|
115
|
-
context.log(`Missing type tag for ${project.name}. Adding...`);
|
|
116
|
-
|
|
117
|
-
project = readProjectConfiguration(tree, project.name as string);
|
|
118
|
-
|
|
119
|
-
updateProjectConfiguration(tree, project.name as string, { ...project, tags: [...(project.tags || []), 'type:app'] });
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export const checkLibraryTags = (project: ProjectConfiguration, tree: Tree, context: LibTagsContext): void => {
|
|
124
|
-
const { tags } = project;
|
|
125
|
-
const appTag = tags?.find((tag) => tag.startsWith('app:'));
|
|
126
|
-
const scopeTag = tags?.find((tag) => tag.startsWith('scope:'));
|
|
127
|
-
const typeTag = tags?.find((tag) => tag.startsWith('type:'));
|
|
128
|
-
|
|
129
|
-
verifyLibraryTag({ project, tree, tag: appTag, tagType: 'app', context });
|
|
130
|
-
verifyLibraryTag({
|
|
131
|
-
project,
|
|
132
|
-
tree,
|
|
133
|
-
tag: scopeTag,
|
|
134
|
-
tagType:'scope',
|
|
135
|
-
context,
|
|
136
|
-
ruleNotFoundCallback:() => {
|
|
137
|
-
context.log(`Missing scope tag rule for ${scopeTag}. Adding...`);
|
|
138
|
-
addNxScopeTag(tree, scopeTag?.replace('scope:', '') as string);
|
|
139
|
-
context.reload(tree);
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
verifyLibraryTag({ project, tree, tag: typeTag, tagType: 'type', context });
|
|
143
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import {
|
|
3
|
-
addDependenciesToPackageJson,
|
|
4
|
-
formatFiles,
|
|
5
|
-
generateFiles,
|
|
6
|
-
installPackagesTask,
|
|
7
|
-
readJson,
|
|
8
|
-
Tree,
|
|
9
|
-
writeJson,
|
|
10
|
-
} from '@nx/devkit';
|
|
11
|
-
import { NextAppGeneratorSchema } from './schema';
|
|
12
|
-
import { existsSync } from 'fs';
|
|
13
|
-
import { dependencies } from '../../shared/dependencies';
|
|
14
|
-
import { BaseGeneratorType } from '../../shared/enums';
|
|
15
|
-
import { runApiClientGenerator, runAppEnvGenerator, runFormUtilsGenerator, runStoreGenerator } from '../../shared/generators';
|
|
16
|
-
import { addNxAppTag, askQuestion, formatName } from '../../shared/utils';
|
|
17
|
-
import * as path from 'path';
|
|
18
|
-
|
|
19
|
-
export async function nextAppGenerator(
|
|
20
|
-
tree: Tree,
|
|
21
|
-
options: NextAppGeneratorSchema,
|
|
22
|
-
) {
|
|
23
|
-
const shouldGenerateStoreLib = await askQuestion('Do you want to create store lib? (y/n): ') === 'y';
|
|
24
|
-
const shouldGenerateApiClientLib = shouldGenerateStoreLib && await askQuestion('Do you want to create api client lib? (y/n): ') === 'y';
|
|
25
|
-
const shouldGenerateFormUtilsLib = await askQuestion('Do you want to create a lib with the form utils? (y/n): ') === 'y';
|
|
26
|
-
|
|
27
|
-
const appRoot = `apps/${options.directory}`;
|
|
28
|
-
const tags = [`app:${options.directory}`, 'type:app'];
|
|
29
|
-
|
|
30
|
-
// Install @nx/next plugin
|
|
31
|
-
execSync('npx nx add @nx/next', { stdio: 'inherit' });
|
|
32
|
-
|
|
33
|
-
if (!existsSync(appRoot)) {
|
|
34
|
-
execSync(
|
|
35
|
-
`npx nx g @nx/next:app ${options.name} --directory=apps/${options.directory} --tags="${tags.join(', ')}" --linter=eslint --appDir=true --style=scss --src=false --unitTestRunner=none --e2eTestRunner=none`,
|
|
36
|
-
{ stdio: 'inherit' },
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Install @nx/expo to generate libs
|
|
41
|
-
const packageJson = readJson(tree, 'package.json');
|
|
42
|
-
const hasNxExpo = !!packageJson.devDependencies['@nx/expo'];
|
|
43
|
-
if (!hasNxExpo) {
|
|
44
|
-
execSync('npx nx add @nx/expo', { stdio: 'inherit' });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
await runAppEnvGenerator(tree, { ...options, baseGeneratorType: BaseGeneratorType.NEXT_APP });
|
|
48
|
-
|
|
49
|
-
if (shouldGenerateStoreLib) {
|
|
50
|
-
await runStoreGenerator(tree, { ...options, baseGeneratorType: BaseGeneratorType.NEXT_APP });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (shouldGenerateApiClientLib) {
|
|
54
|
-
await runApiClientGenerator(tree, options);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (shouldGenerateFormUtilsLib) {
|
|
58
|
-
await runFormUtilsGenerator(tree, options);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Remove unnecessary files and files that will be replaced
|
|
62
|
-
tree.delete(`${appRoot}/public/.gitkeep`);
|
|
63
|
-
tree.delete(`${appRoot}/app/api`);
|
|
64
|
-
tree.delete(`${appRoot}/app/page.tsx`);
|
|
65
|
-
tree.delete(`${appRoot}/app/page.module.scss`);
|
|
66
|
-
tree.delete(`${appRoot}/app/global.css`);
|
|
67
|
-
tree.delete(`${appRoot}/app/layout.tsx`);
|
|
68
|
-
tree.delete(`${appRoot}/specs`);
|
|
69
|
-
tree.delete(`${appRoot}/.eslintrc.json`);
|
|
70
|
-
|
|
71
|
-
// Update app tsconfig.json to skip automatic reconfiguration during the first application run
|
|
72
|
-
const appTsconfigPath = `${appRoot}/tsconfig.json`;
|
|
73
|
-
const appTsconfigJson = readJson(tree, appTsconfigPath);
|
|
74
|
-
const nextTypesInclude = '.next/types/**/*.ts';
|
|
75
|
-
|
|
76
|
-
if (!appTsconfigJson.include.includes(nextTypesInclude)) {
|
|
77
|
-
appTsconfigJson.include.push(nextTypesInclude);
|
|
78
|
-
writeJson(tree, appTsconfigPath, appTsconfigJson);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Add app files
|
|
82
|
-
generateFiles(tree, path.join(__dirname, 'files'), appRoot, {
|
|
83
|
-
...options,
|
|
84
|
-
formatName,
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
addNxAppTag(tree, options.directory);
|
|
88
|
-
|
|
89
|
-
// Add dependencies
|
|
90
|
-
addDependenciesToPackageJson(tree, dependencies['next-app'], {});
|
|
91
|
-
|
|
92
|
-
await formatFiles(tree);
|
|
93
|
-
|
|
94
|
-
return () => {
|
|
95
|
-
installPackagesTask(tree);
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export default nextAppGenerator;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'fs';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import { formatFiles, generateFiles, Tree } from '@nx/devkit';
|
|
4
|
-
import { kebabCase } from 'lodash';
|
|
5
|
-
import {
|
|
6
|
-
appendFileContent,
|
|
7
|
-
askQuestion,
|
|
8
|
-
createCliReadline,
|
|
9
|
-
dynamicImport,
|
|
10
|
-
formatName,
|
|
11
|
-
getNxLibsPaths,
|
|
12
|
-
LibraryType,
|
|
13
|
-
searchNxLibsPaths
|
|
14
|
-
} from '../../shared/utils';
|
|
15
|
-
import { ReactComponentGeneratorSchema } from './schema';
|
|
16
|
-
|
|
17
|
-
export async function reactComponentGenerator(tree: Tree, options: ReactComponentGeneratorSchema) {
|
|
18
|
-
const { default: autocomplete } = await dynamicImport<typeof import('inquirer-autocomplete-standalone')>(
|
|
19
|
-
'inquirer-autocomplete-standalone',
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const nxLibsPaths = getNxLibsPaths([LibraryType.FEATURES, LibraryType.UI]);
|
|
23
|
-
|
|
24
|
-
const libPath = await autocomplete({
|
|
25
|
-
message: 'Enter the library path:',
|
|
26
|
-
source: async (input) => {
|
|
27
|
-
const filteredNxLibsPaths = searchNxLibsPaths(nxLibsPaths, input as string);
|
|
28
|
-
|
|
29
|
-
return filteredNxLibsPaths.map((path) => ({ value: path }));
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
const cliReadline = createCliReadline();
|
|
34
|
-
options.name =
|
|
35
|
-
options.name || (await askQuestion('Enter the name of the component (e.g: AppButton): ', undefined, cliReadline));
|
|
36
|
-
options.subcomponent =
|
|
37
|
-
options.subcomponent ||
|
|
38
|
-
(await askQuestion('Generate component inside components folder? (y/n): ', undefined, cliReadline)) === 'y';
|
|
39
|
-
options.withForwardRef =
|
|
40
|
-
options.withForwardRef ||
|
|
41
|
-
(await askQuestion('Generate component with forwardRef? (y/n): ', undefined, cliReadline)) === 'y';
|
|
42
|
-
cliReadline.close();
|
|
43
|
-
|
|
44
|
-
const libRootPath = `${libPath}/lib`;
|
|
45
|
-
const componentsPath = `${libRootPath}/components`;
|
|
46
|
-
const componentPath = options.subcomponent ? `${libRootPath}/components/${kebabCase(options.name)}` : libRootPath;
|
|
47
|
-
const shouldUpdateSrcIndex = !existsSync(libRootPath);
|
|
48
|
-
const shouldUpdateLibIndex = !existsSync(componentsPath) && options.subcomponent;
|
|
49
|
-
|
|
50
|
-
generateFiles(tree, path.join(__dirname, `files`), componentPath, {
|
|
51
|
-
...options,
|
|
52
|
-
name: formatName(options.name, true)
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
const updateIndexes = (): void => {
|
|
56
|
-
const componentsIndexFilePath = `${libRootPath}/components/index.ts`;
|
|
57
|
-
|
|
58
|
-
if (shouldUpdateSrcIndex) {
|
|
59
|
-
appendFileContent(`${libPath}/index.ts`, `export * from './lib';\n`, tree);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (shouldUpdateLibIndex) {
|
|
63
|
-
appendFileContent(`${libRootPath}/index.ts`, `export * from './components';\n`, tree);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (!existsSync(componentsIndexFilePath)) {
|
|
67
|
-
tree.write(componentsIndexFilePath, `export * from './${kebabCase(options.name)}';\n`);
|
|
68
|
-
} else {
|
|
69
|
-
appendFileContent(componentsIndexFilePath, `export * from './${kebabCase(options.name)}';\n`, tree);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
if (options.subcomponent) {
|
|
74
|
-
updateIndexes();
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
await formatFiles(tree);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default reactComponentGenerator;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import { formatFiles, generateFiles, output, Tree } from '@nx/devkit';
|
|
4
|
-
import { isBoolean } from 'lodash';
|
|
5
|
-
import {
|
|
6
|
-
addNxScopeTag,
|
|
7
|
-
askQuestion,
|
|
8
|
-
constants,
|
|
9
|
-
dynamicImport,
|
|
10
|
-
filterSource,
|
|
11
|
-
formatName,
|
|
12
|
-
LibraryType,
|
|
13
|
-
selectProject,
|
|
14
|
-
validateLibraryType,
|
|
15
|
-
getLibDirectoryName,
|
|
16
|
-
createCliReadline
|
|
17
|
-
} from '../../shared/utils';
|
|
18
|
-
import { ReactLibGeneratorSchema } from './schema';
|
|
19
|
-
|
|
20
|
-
export async function reactLibGenerator(tree: Tree, options: ReactLibGeneratorSchema) {
|
|
21
|
-
const { default: autocomplete } = await dynamicImport<typeof import('inquirer-autocomplete-standalone')>(
|
|
22
|
-
'inquirer-autocomplete-standalone',
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
options.app = options.app || (await selectProject(tree, 'application', 'Select the application: ')).name;
|
|
26
|
-
|
|
27
|
-
const isSharedLib = options.app === constants.sharedValue;
|
|
28
|
-
|
|
29
|
-
options.scope =
|
|
30
|
-
options.scope ||
|
|
31
|
-
(isSharedLib ? '' : await askQuestion(`Enter the scope (e.g: profile) or '${constants.sharedValue}': `));
|
|
32
|
-
options.type = options.type
|
|
33
|
-
? validateLibraryType(options.type)
|
|
34
|
-
: await autocomplete({
|
|
35
|
-
message: 'Select the library type: ',
|
|
36
|
-
source: (input) => filterSource(input as string, Object.values(LibraryType))
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const cliReadline = createCliReadline();
|
|
40
|
-
options.name =
|
|
41
|
-
options.name || (await askQuestion('Enter the name of the library (e.g: settings): ', undefined, cliReadline));
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
[LibraryType.FEATURES, LibraryType.UI].includes(options.type as LibraryType) &&
|
|
45
|
-
!isBoolean(options.withComponent)
|
|
46
|
-
) {
|
|
47
|
-
options.withComponent =
|
|
48
|
-
(await askQuestion('Generate component inside lib folder? (y/n): ', undefined, cliReadline)) === 'y';
|
|
49
|
-
|
|
50
|
-
if (options.withComponent && !isBoolean(options.withComponentForwardRef)) {
|
|
51
|
-
options.withComponentForwardRef =
|
|
52
|
-
(await askQuestion('Generate component with forwardRef? (y/n): ', undefined, cliReadline)) === 'y';
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
cliReadline.close();
|
|
56
|
-
|
|
57
|
-
const scopeTag = options.scope || constants.sharedValue;
|
|
58
|
-
const tags = [`app:${options.app}`, `scope:${scopeTag}`, `type:${options.type}`];
|
|
59
|
-
|
|
60
|
-
const libDirectoryName = getLibDirectoryName(options.name, options.scope);
|
|
61
|
-
const libName = path.normalize(`${options.app}/${options.scope}/${options.type}/${libDirectoryName}`);
|
|
62
|
-
const libPath = `libs/${libName}`;
|
|
63
|
-
const command = `npx nx g @nx/expo:lib --skipPackageJson --unitTestRunner=none --tags="${tags.join(', ')}" --name=${libName} ${libPath} --linter=eslint`;
|
|
64
|
-
const commandWithOptions = options.dryRun ? command + ' --dry-run' : command;
|
|
65
|
-
|
|
66
|
-
execSync(commandWithOptions, { stdio: 'inherit' });
|
|
67
|
-
|
|
68
|
-
if (options.withComponent) {
|
|
69
|
-
const srcPath = `${libPath}/src`;
|
|
70
|
-
|
|
71
|
-
generateFiles(tree, path.join(__dirname, 'files'), srcPath, { ...options, name: formatName(options.name, true) });
|
|
72
|
-
tree.write(`${srcPath}/index.ts`, 'export * from \'./lib\';');
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
addNxScopeTag(tree, scopeTag);
|
|
76
|
-
|
|
77
|
-
await formatFiles(tree);
|
|
78
|
-
|
|
79
|
-
if (libDirectoryName !== options.name) {
|
|
80
|
-
output.warn({
|
|
81
|
-
title: `The library directory was changed to ${output.bold(libDirectoryName)} so that it does not start with the scope name.`
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export default reactLibGenerator;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as path from 'path';
|
|
2
|
-
import {
|
|
3
|
-
addDependenciesToPackageJson,
|
|
4
|
-
formatFiles,
|
|
5
|
-
generateFiles,
|
|
6
|
-
installPackagesTask,
|
|
7
|
-
readJson,
|
|
8
|
-
Tree,
|
|
9
|
-
writeJson,
|
|
10
|
-
} from '@nx/devkit';
|
|
11
|
-
import { devDependencies } from '../../shared/dependencies';
|
|
12
|
-
import scripts from './scripts';
|
|
13
|
-
import { formatName, getProjectName } from '../../shared/utils';
|
|
14
|
-
|
|
15
|
-
export async function repoConfigGenerator(tree: Tree) {
|
|
16
|
-
const projectRoot = '.';
|
|
17
|
-
const projectPackagePath = 'package.json';
|
|
18
|
-
|
|
19
|
-
// Remove unnecessary files and files that will be replaced
|
|
20
|
-
tree.delete('README.md');
|
|
21
|
-
|
|
22
|
-
// Update project package.json
|
|
23
|
-
const projectPackageJson = readJson(tree, projectPackagePath);
|
|
24
|
-
projectPackageJson.workspaces = ['apps/*'];
|
|
25
|
-
projectPackageJson.scripts = { ...scripts, ...projectPackageJson.scripts };
|
|
26
|
-
writeJson(tree, projectPackagePath, projectPackageJson);
|
|
27
|
-
|
|
28
|
-
// Add project files
|
|
29
|
-
generateFiles(tree, path.join(__dirname, 'files'), projectRoot, {
|
|
30
|
-
name: getProjectName(projectPackageJson.name),
|
|
31
|
-
formatName,
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// Add dependencies
|
|
35
|
-
addDependenciesToPackageJson(tree, {}, devDependencies['repo-config']);
|
|
36
|
-
|
|
37
|
-
await formatFiles(tree);
|
|
38
|
-
|
|
39
|
-
return () => {
|
|
40
|
-
installPackagesTask(tree);
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export default repoConfigGenerator;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
export const dependencies = {
|
|
2
|
-
'expo-app': {
|
|
3
|
-
"@ronas-it/react-native-common-modules": "^0.6.0",
|
|
4
|
-
'expo-constants': '~17.0.3',
|
|
5
|
-
'expo-dev-client': '^5.0.6',
|
|
6
|
-
'expo-router': '~4.0.14',
|
|
7
|
-
'react-native-safe-area-context': '^4.10.5',
|
|
8
|
-
'react-native-screens': '~4.1.0',
|
|
9
|
-
'expo-linking': '~7.0.3',
|
|
10
|
-
'expo-status-bar': '^2.0.0',
|
|
11
|
-
'expo-updates': '^0.26.10',
|
|
12
|
-
'expo-insights': '~0.8.1',
|
|
13
|
-
"lodash-es": "^4.17.21"
|
|
14
|
-
},
|
|
15
|
-
'expo-app-root': {
|
|
16
|
-
// Need new version to fix this error:
|
|
17
|
-
// https://github.com/kristerkari/react-native-svg-transformer/issues/329
|
|
18
|
-
'react-native-svg-transformer': '^1.4.0'
|
|
19
|
-
},
|
|
20
|
-
'next-app': {
|
|
21
|
-
'next-intl': '^3.17.2',
|
|
22
|
-
},
|
|
23
|
-
'api-client': {
|
|
24
|
-
'@ronas-it/axios-api-client': '^0.1.0',
|
|
25
|
-
},
|
|
26
|
-
'auth': {
|
|
27
|
-
'luxon': '^3.4.4'
|
|
28
|
-
},
|
|
29
|
-
'rn-styles': {
|
|
30
|
-
'react-native-extended-stylesheet': '^0.12.0'
|
|
31
|
-
},
|
|
32
|
-
'store': {
|
|
33
|
-
'@ronas-it/rtkq-entity-api': '^0.3.1',
|
|
34
|
-
'react-redux': '^9.1.2'
|
|
35
|
-
},
|
|
36
|
-
'ui-kitten': {
|
|
37
|
-
'@eva-design/eva': '^2.2.0',
|
|
38
|
-
'@ui-kitten/components': '^5.3.1'
|
|
39
|
-
},
|
|
40
|
-
'form': {
|
|
41
|
-
'@hookform/resolvers': '^3.9.0',
|
|
42
|
-
'react-hook-form': '^7.53.0',
|
|
43
|
-
'yup': '^1.4.0'
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const devDependencies = {
|
|
48
|
-
'code-checks': {
|
|
49
|
-
'eslint': '^9.8.0',
|
|
50
|
-
'prettier': '^3.3.2',
|
|
51
|
-
'eslint-config-prettier': '^9.1.0',
|
|
52
|
-
'eslint-import-resolver-typescript': '^3.7.0',
|
|
53
|
-
'eslint-plugin-import': '^2.29.1',
|
|
54
|
-
'eslint-plugin-jsx-a11y': '^6.9.0',
|
|
55
|
-
'eslint-plugin-react': '^7.34.3',
|
|
56
|
-
'eslint-plugin-react-hooks': '^5.0.0',
|
|
57
|
-
'eslint-plugin-unused-imports': '^4.1.4',
|
|
58
|
-
'husky': '^9.1.5',
|
|
59
|
-
'@stylistic/eslint-plugin': '^2.12.1',
|
|
60
|
-
'@typescript-eslint/eslint-plugin': '^8.18.1',
|
|
61
|
-
'@typescript-eslint/parser': '^8.18.1',
|
|
62
|
-
'tsc-files': '^1.1.4',
|
|
63
|
-
},
|
|
64
|
-
'expo-app': {
|
|
65
|
-
'@types/lodash': '^4.14.194',
|
|
66
|
-
},
|
|
67
|
-
'expo-app-root': {
|
|
68
|
-
'cross-env': '^7.0.3'
|
|
69
|
-
},
|
|
70
|
-
'repo-config': {
|
|
71
|
-
'syncpack': '^12.3.2',
|
|
72
|
-
},
|
|
73
|
-
'auth': {
|
|
74
|
-
'@types/luxon': '3.4.2'
|
|
75
|
-
}
|
|
76
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import { existsSync } from 'fs';
|
|
3
|
-
import * as path from 'path';
|
|
4
|
-
import {
|
|
5
|
-
addDependenciesToPackageJson,
|
|
6
|
-
formatFiles,
|
|
7
|
-
generateFiles,
|
|
8
|
-
Tree
|
|
9
|
-
} from '@nx/devkit';
|
|
10
|
-
import { dependencies } from '../../dependencies';
|
|
11
|
-
import { formatName, formatAppIdentifier, getImportPathPrefix } from '../../utils';
|
|
12
|
-
|
|
13
|
-
export async function runApiClientGenerator(
|
|
14
|
-
tree: Tree,
|
|
15
|
-
options: { name: string; directory: string }
|
|
16
|
-
) {
|
|
17
|
-
const appRoot = `apps/${options.directory}`;
|
|
18
|
-
const libRoot = `libs/${options.directory}`;
|
|
19
|
-
const libPath = `${getImportPathPrefix(tree)}/${options.directory}`;
|
|
20
|
-
|
|
21
|
-
// Generate shared libs
|
|
22
|
-
execSync(`npx nx g react-lib --app=${options.directory} --scope=shared --type=data-access --name=api-client`, { stdio: 'inherit' });
|
|
23
|
-
|
|
24
|
-
const appPackagePath = `${appRoot}/package.json`;
|
|
25
|
-
|
|
26
|
-
// Remove unnecessary files and files that will be replaced
|
|
27
|
-
tree.delete(`${libRoot}/shared/data-access/api-client/src/index.ts`);
|
|
28
|
-
|
|
29
|
-
// Add lib files
|
|
30
|
-
generateFiles(tree, path.join(__dirname, '/lib-files'), libRoot, {
|
|
31
|
-
...options,
|
|
32
|
-
formatName,
|
|
33
|
-
formatAppIdentifier,
|
|
34
|
-
formatDirectory: () => libPath
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
// Add dependencies
|
|
38
|
-
addDependenciesToPackageJson(tree, dependencies['api-client'], {});
|
|
39
|
-
|
|
40
|
-
if (existsSync(appPackagePath)) {
|
|
41
|
-
addDependenciesToPackageJson(tree, dependencies['api-client'], {}, appPackagePath);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
await formatFiles(tree);
|
|
45
|
-
|
|
46
|
-
console.warn(`\nPlease set api endpoint in ${libPath}/shared/data-access/api-client/src/configuration.ts`);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default runApiClientGenerator;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import {
|
|
4
|
-
formatFiles,
|
|
5
|
-
generateFiles,
|
|
6
|
-
Tree
|
|
7
|
-
} from '@nx/devkit';
|
|
8
|
-
import { BaseGeneratorType } from '../../enums';
|
|
9
|
-
import { formatName, formatAppIdentifier, getImportPathPrefix } from '../../utils';
|
|
10
|
-
|
|
11
|
-
export async function runAppEnvGenerator(
|
|
12
|
-
tree: Tree,
|
|
13
|
-
options: { name: string; directory: string, baseGeneratorType: BaseGeneratorType }
|
|
14
|
-
) {
|
|
15
|
-
const libRoot = `libs/${options.directory}`;
|
|
16
|
-
const appType = options.baseGeneratorType.split('-')[0].toUpperCase();
|
|
17
|
-
const libPath = `${getImportPathPrefix(tree)}/${options.directory}`;
|
|
18
|
-
|
|
19
|
-
// Generate shared libs
|
|
20
|
-
execSync(`npx nx g react-lib --app=${options.directory} --scope=shared --type=utils --name=app-env`, { stdio: 'inherit' });
|
|
21
|
-
|
|
22
|
-
// Remove unnecessary files and files that will be replaced
|
|
23
|
-
tree.delete(`${libRoot}/shared/utils/app-env/src/index.ts`);
|
|
24
|
-
|
|
25
|
-
// Add lib files
|
|
26
|
-
generateFiles(tree, path.join(__dirname, 'lib-files'), libRoot, {
|
|
27
|
-
...options,
|
|
28
|
-
formatName,
|
|
29
|
-
formatAppIdentifier,
|
|
30
|
-
formatDirectory: () => libPath,
|
|
31
|
-
appType
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
await formatFiles(tree);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export default runAppEnvGenerator;
|