-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit f85ac76
feat(@schematics/angular): support different file name style guides in
Introduces the ability to configure the file naming convention for generated files directly within the `ng new` schematic. This allows users to create new workspaces that adhere to the 2016 style guide conventions, as an alternative to the default 2025 style guide. For more information, see the Angular Style Guide (https://angular.dev/style-guide).
When a user runs `ng new --file-name-style-guide 2016`:
- The `ng-new` schematic passes the style guide option down to the `application` sub-schematic.
- The `application` schematic configures the `schematics` section of the new `angular.json` to use the 2016 naming conventions for future `ng generate` commands.
- The `application` schematic generates the initial application files with the appropriate suffixes (e.g., `app.component.ts`).
This addresses community feedback requesting a way to maintain the previous file naming structure for consistency in existing projects and workflows.
Fixes #30594 ng new
1 parent 261dbb3 commit f85ac76
File tree
10 files changed
+64
-1
lines changed- packages/schematics/angular
- application
- files
- common-files/src/app
- module-files/src/app
- standalone-files/src/app
- ng-new
10 files changed
+64
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 | + | ||
71 | + | ||
70 | 72 |
| |
71 | 73 |
| |
72 | 74 |
| |
| |||
108 | 110 |
| |
109 | 111 |
| |
110 | 112 |
| |
113 | + | ||
111 | 114 |
| |
112 | 115 |
| |
113 | 116 |
| |
| |||
119 | 122 |
| |
120 | 123 |
| |
121 | 124 |
| |
122 | - | ||
125 | + | ||
123 | 126 |
| |
124 | 127 |
| |
125 | 128 |
| |
| |||
128 | 131 |
| |
129 | 132 |
| |
130 | 133 |
| |
134 | + | ||
131 | 135 |
| |
132 | 136 |
| |
133 | 137 |
| |
| |||
233 | 237 |
| |
234 | 238 |
| |
235 | 239 |
| |
240 | + | ||
241 | + | ||
242 | + | ||
243 | + | ||
244 | + | ||
245 | + | ||
246 | + | ||
247 | + | ||
248 | + | ||
249 | + | ||
250 | + | ||
251 | + | ||
252 | + | ||
236 | 253 |
| |
237 | 254 |
| |
238 | 255 |
| |
| |||
389 | 406 |
| |
390 | 407 |
| |
391 | 408 |
| |
409 | + | ||
410 | + | ||
411 | + | ||
412 | + | ||
392 | 413 |
| |
393 | 414 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 | + | ||
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | ||
135 | + | ||
130 | 136 |
| |
131 | 137 |
| |
132 | 138 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 | + | ||
61 | 62 |
| |
62 | 63 |
| |
63 | 64 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | ||
135 | + | ||
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | ||
140 | + | ||
141 | + | ||
142 | + | ||
143 | + | ||
144 | + | ||
145 | + | ||
146 | + | ||
147 | + | ||
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | ||
156 | + | ||
157 | + | ||
158 | + | ||
159 | + | ||
131 | 160 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
151 | 151 |
| |
152 | 152 |
| |
153 | 153 |
| |
154 | + | ||
155 | + | ||
156 | + | ||
157 | + | ||
158 | + | ||
159 | + | ||
154 | 160 |
| |
155 | 161 |
| |
156 | 162 |
| |
|
0 commit comments