Skip to content

Commit bd5e55e

Browse files
committed
feat(ui,api,util): support standalone components
1 parent 31533a9 commit bd5e55e

File tree

9 files changed

+33
-6
lines changed

9 files changed

+33
-6
lines changed

libs/ddd/src/generators/api/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export default async function (tree: Tree, options: ApiOptions) {
2424
publishable: isPublishableLib,
2525
buildable: options.type === 'buildable',
2626
directory: libDirectory,
27-
importPath: options.importPath
27+
importPath: options.importPath,
28+
skipModule: options.standalone,
2829
});
2930

3031
console.info(`\nHINT: Don\'t forget to extend the rules in your .eslintrc to allow selected domains to access this API.\nFor this, add the tag domain:${domain}/${libName} to the respective domains' rule sets.\n `);

libs/ddd/src/generators/api/schema.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333
"type": "string",
3434
"enum": ["internal", "buildable", "publishable"],
3535
"description": "A type to determine if and how to build the library.",
36-
"default": "buildable"
36+
"default": "internal"
37+
},
38+
"standalone": {
39+
"type": "boolean",
40+
"default": false,
41+
"description": "Use standalone components?"
3742
}
3843
}
3944
}

libs/ddd/src/generators/api/schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ export interface ApiOptions {
3030
* A type to determine if and how to build the library.
3131
*/
3232
type?: "internal" | "buildable" | "publishable";
33+
34+
standalone: boolean;
35+
3336
[k: string]: any;
3437
}

libs/ddd/src/generators/ui/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export default async function (tree: Tree, options: UiOptions) {
2121
publishable: isPublishableLib,
2222
buildable: options.type === 'buildable',
2323
directory: libDirectory,
24-
importPath: options.importPath
24+
importPath: options.importPath,
25+
skipModule: options.standalone,
2526
});
2627
await formatFiles(tree);
2728
}

libs/ddd/src/generators/ui/schema.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333
"type": "string",
3434
"enum": ["internal", "buildable", "publishable"],
3535
"description": "A type to determine if and how to build the library.",
36-
"default": "buildable"
36+
"default": "internal"
37+
},
38+
"standalone": {
39+
"type": "boolean",
40+
"default": false,
41+
"description": "Use standalone components?"
3742
}
3843
},
3944
"required": ["name"]

libs/ddd/src/generators/ui/schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export interface UiOptions {
2929
/**
3030
* A type to determine if and how to build the library.
3131
*/
32+
33+
standalone: boolean;
34+
3235
type?: "internal" | "buildable" | "publishable";
3336
[k: string]: any;
3437
}

libs/ddd/src/generators/util/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export default async function (tree: Tree, options: UtilOptions) {
2121
publishable: isPublishableLib,
2222
buildable: options.type === 'buildable',
2323
directory: libDirectory,
24-
importPath: options.importPath
24+
importPath: options.importPath,
25+
skipModule: options.standalone,
2526
})
2627

2728
await formatFiles(tree);

libs/ddd/src/generators/util/schema.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333
"type": "string",
3434
"enum": ["internal", "buildable", "publishable"],
3535
"description": "A type to determine if and how to build the library.",
36-
"default": "buildable"
36+
"default": "internal"
37+
},
38+
"standalone": {
39+
"type": "boolean",
40+
"default": false,
41+
"description": "Use standalone components?"
3742
}
3843
},
3944
"required": ["name"]

libs/ddd/src/generators/util/schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ export interface UtilOptions {
3030
* A type to determine if and how to build the library.
3131
*/
3232
type?: "internal" | "buildable" | "publishable";
33+
34+
standalone: boolean;
35+
3336
[k: string]: any;
3437
}

0 commit comments

Comments
 (0)