Skip to content

Commit a1fdb2e

Browse files
committed
Update config type
1 parent a92c664 commit a1fdb2e

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ export type Config = {
148148
classBased?: boolean;
149149
// Copy the generated component to the clipboard, instead of writing it to disk:
150150
copy?: boolean;
151+
// The current working directory to run the component generator in:
152+
cwd?: string;
151153
// Log the generated component to the console, instead of writing it to disk:
152154
log?: boolean;
153155
// Generate a nested colocated component, e.g. `foo/bar/index.gts`:
@@ -160,6 +162,8 @@ export type Config = {
160162
"component-test"?: {
161163
// Copy the generated component-test to the clipboard, instead of writing it to disk:
162164
copy?: boolean;
165+
// The current working directory to run the component-test generator in:
166+
cwd?: string;
163167
// Log the generated component-test to the console, instead of writing it to disk:
164168
log?: boolean;
165169
// Generate a component-test at a custom path, e.g. `--path=src/-private`:
@@ -172,6 +176,8 @@ export type Config = {
172176
classBased?: boolean;
173177
// Copy the generated helper to the clipboard, instead of writing it to disk:
174178
copy?: boolean;
179+
// The current working directory to run the helper generator in:
180+
cwd?: string;
175181
// Log the generated helper to the console, instead of writing it to disk:
176182
log?: boolean;
177183
// Generate a helper at a custom path, e.g. `--path=src/-private`:
@@ -182,6 +188,8 @@ export type Config = {
182188
"helper-test"?: {
183189
// Copy the generated helper-test to the clipboard, instead of writing it to disk:
184190
copy?: boolean;
191+
// The current working directory to run the helper-test generator in:
192+
cwd?: string;
185193
// Log the generated helper-test to the console, instead of writing it to disk:
186194
log?: boolean;
187195
// Generate a helper-test at a custom path, e.g. `--path=src/-private`:
@@ -194,6 +202,8 @@ export type Config = {
194202
classBased?: boolean;
195203
// Copy the generated modifier to the clipboard, instead of writing it to disk:
196204
copy?: boolean;
205+
// The current working directory to run the modifier generator in:
206+
cwd?: string;
197207
// Log the generated modifier to the console, instead of writing it to disk:
198208
log?: boolean;
199209
// Generate a modifier at a custom path, e.g. `--path=src/-private`:
@@ -204,6 +214,8 @@ export type Config = {
204214
"modifier-test"?: {
205215
// Copy the generated modifier-test to the clipboard, instead of writing it to disk:
206216
copy?: boolean;
217+
// The current working directory to run the modifier-test generator in:
218+
cwd?: string;
207219
// Log the generated modifier-test to the console, instead of writing it to disk:
208220
log?: boolean;
209221
// Generate a modifier-test at a custom path, e.g. `--path=src/-private`:
@@ -214,6 +226,8 @@ export type Config = {
214226
service?: {
215227
// Copy the generated service to the clipboard, instead of writing it to disk:
216228
copy?: boolean;
229+
// The current working directory to run the service generator in:
230+
cwd?: string;
217231
// Log the generated service to the console, instead of writing it to disk:
218232
log?: boolean;
219233
// Generate a service at a custom path, e.g. `--path=src/-private`:
@@ -224,6 +238,8 @@ export type Config = {
224238
"service-test"?: {
225239
// Copy the generated service-test to the clipboard, instead of writing it to disk:
226240
copy?: boolean;
241+
// The current working directory to run the service-test generator in:
242+
cwd?: string;
227243
// Log the generated service-test to the console, instead of writing it to disk:
228244
log?: boolean;
229245
// Generate a service-test at a custom path, e.g. `--path=src/-private`:
@@ -234,6 +250,8 @@ export type Config = {
234250
"acceptance-test"?: {
235251
// Copy the generated acceptance-test to the clipboard, instead of writing it to disk:
236252
copy?: boolean;
253+
// The current working directory to run the acceptance-test generator in:
254+
cwd?: string;
237255
// Log the generated acceptance-test to the console, instead of writing it to disk:
238256
log?: boolean;
239257
// Generate a acceptance-test at a custom path, e.g. `--path=src/-private`:

src/config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export type Config = {
1010
classBased?: boolean;
1111
// Copy the generated component to the clipboard, instead of writing it to disk:
1212
copy?: boolean;
13+
// The current working directory to run the component generator in:
14+
cwd?: string;
1315
// Log the generated component to the console, instead of writing it to disk:
1416
log?: boolean;
1517
// Generate a nested colocated component, e.g. `foo/bar/index.gts`:
@@ -22,6 +24,8 @@ export type Config = {
2224
"component-test"?: {
2325
// Copy the generated component-test to the clipboard, instead of writing it to disk:
2426
copy?: boolean;
27+
// The current working directory to run the component-test generator in:
28+
cwd?: string;
2529
// Log the generated component-test to the console, instead of writing it to disk:
2630
log?: boolean;
2731
// Generate a component-test at a custom path, e.g. `--path=src/-private`:
@@ -34,6 +38,8 @@ export type Config = {
3438
classBased?: boolean;
3539
// Copy the generated helper to the clipboard, instead of writing it to disk:
3640
copy?: boolean;
41+
// The current working directory to run the helper generator in:
42+
cwd?: string;
3743
// Log the generated helper to the console, instead of writing it to disk:
3844
log?: boolean;
3945
// Generate a helper at a custom path, e.g. `--path=src/-private`:
@@ -44,6 +50,8 @@ export type Config = {
4450
"helper-test"?: {
4551
// Copy the generated helper-test to the clipboard, instead of writing it to disk:
4652
copy?: boolean;
53+
// The current working directory to run the helper-test generator in:
54+
cwd?: string;
4755
// Log the generated helper-test to the console, instead of writing it to disk:
4856
log?: boolean;
4957
// Generate a helper-test at a custom path, e.g. `--path=src/-private`:
@@ -56,6 +64,8 @@ export type Config = {
5664
classBased?: boolean;
5765
// Copy the generated modifier to the clipboard, instead of writing it to disk:
5866
copy?: boolean;
67+
// The current working directory to run the modifier generator in:
68+
cwd?: string;
5969
// Log the generated modifier to the console, instead of writing it to disk:
6070
log?: boolean;
6171
// Generate a modifier at a custom path, e.g. `--path=src/-private`:
@@ -66,6 +76,8 @@ export type Config = {
6676
"modifier-test"?: {
6777
// Copy the generated modifier-test to the clipboard, instead of writing it to disk:
6878
copy?: boolean;
79+
// The current working directory to run the modifier-test generator in:
80+
cwd?: string;
6981
// Log the generated modifier-test to the console, instead of writing it to disk:
7082
log?: boolean;
7183
// Generate a modifier-test at a custom path, e.g. `--path=src/-private`:
@@ -76,6 +88,8 @@ export type Config = {
7688
service?: {
7789
// Copy the generated service to the clipboard, instead of writing it to disk:
7890
copy?: boolean;
91+
// The current working directory to run the service generator in:
92+
cwd?: string;
7993
// Log the generated service to the console, instead of writing it to disk:
8094
log?: boolean;
8195
// Generate a service at a custom path, e.g. `--path=src/-private`:
@@ -86,6 +100,8 @@ export type Config = {
86100
"service-test"?: {
87101
// Copy the generated service-test to the clipboard, instead of writing it to disk:
88102
copy?: boolean;
103+
// The current working directory to run the service-test generator in:
104+
cwd?: string;
89105
// Log the generated service-test to the console, instead of writing it to disk:
90106
log?: boolean;
91107
// Generate a service-test at a custom path, e.g. `--path=src/-private`:
@@ -96,6 +112,8 @@ export type Config = {
96112
"acceptance-test"?: {
97113
// Copy the generated acceptance-test to the clipboard, instead of writing it to disk:
98114
copy?: boolean;
115+
// The current working directory to run the acceptance-test generator in:
116+
cwd?: string;
99117
// Log the generated acceptance-test to the console, instead of writing it to disk:
100118
log?: boolean;
101119
// Generate a acceptance-test at a custom path, e.g. `--path=src/-private`:

src/generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ export function copy(): GeneratorArgFactory {
254254
}
255255

256256
export function cwd(): GeneratorArgFactory {
257-
return () => ({
258-
description: "The current working directory to run the generator in",
257+
return (generatorName) => ({
258+
description: `The current working directory to run the ${generatorName} generator in`,
259259
name: "cwd",
260260
type: "string",
261261
});

0 commit comments

Comments
 (0)