Skip to content

Commit 914d729

Browse files
committed
feat: [@wishtack/schematics] scam schematic now merges module and component in the same file as a default behavior.
1 parent 65bf3bd commit 914d729

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/schematics/README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ This will produce the following file tree.
2424
sandwich/
2525
sandwich-preview/
2626
sandwich-preview.component.ts
27-
sandwich-preview.component.*
28-
sandwich-preview.module.ts
27+
sandwich-preview.component.css|scss
28+
sandwich-preview.component.html
29+
sandwich-preview.component.spec.ts
2930
```
3031

31-
Where `sandwich-preview.module.ts` declares and exports `SandwichPreviewComponent`.
32+
The Angular Module (`NgModule`) is declared inside `sandwich-preview.component.ts` which is the recommended approach.
33+
You can read why here [https://medium.com/wishtack/your-angular-module-is-a-scam-b4136ca3917b](https://medium.com/wishtack/your-angular-module-is-a-scam-b4136ca3917b) and here [https://medium.com/@alx_31836/i-am-a-huge-proponent-of-scam-and-im-definitely-using-that-name-from-now-on-cab2fe98fee3](https://medium.com/@alx_31836/i-am-a-huge-proponent-of-scam-and-im-definitely-using-that-name-from-now-on-cab2fe98fee3).
34+
35+
If for some reason, you want a separate file for the module, you can use the `--separate-module` option.

0 commit comments

Comments
 (0)