Skip to content

Commit 97b40ae

Browse files
committed
feat(feature): check if mentioned app exists
1 parent 09c255c commit 97b40ae

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ testem.log
3737
# System Files
3838
.DS_Store
3939
Thumbs.db
40+
41+
/*.tgz

libs/ddd/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-architects/ddd",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"author": "Manfred Steyer",
55
"description": "Nx plugin for structuring a monorepo with domains and layers",
66
"repository": {

libs/ddd/src/schematics/feature/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ export default function(options: FeatureOptions): Rule {
156156
const appFolderName = strings.dasherize(appName);
157157
const appModulePath = `apps/${appFolderName}/src/app/app.module.ts`;
158158

159+
if (options.app) {
160+
const requiredAppModulePath = `apps/${appFolderName}/src/app/app.module.ts`;
161+
if (!host.exists(requiredAppModulePath)) {
162+
throw new Error(`Specified app ${options.app} does not exist: ${requiredAppModulePath} expected!`);
163+
}
164+
}
165+
159166
const domainTemplates = apply(url('./files/forDomain'), [
160167
filterTemplates(options),
161168
template({ ...strings, ...options, workspaceName }),

0 commit comments

Comments
 (0)