File tree Expand file tree Collapse file tree 3 files changed +295
-31
lines changed
packages/cli/src/commands Expand file tree Collapse file tree 3 files changed +295
-31
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ pnpm run dev
136
136
3. Create a new temporary Next.js app in examples directory
137
137
138
138
` ` ` sh
139
- pnpm create next-app@latest
139
+ pnpm create next-app@latest test-cli --ts --no-eslint --tailwind --app --src-dir --import-alias " @/* "
140
140
` ` `
141
141
142
142
Follow the prompts to create a TypeScript project using the App Directory.
@@ -145,14 +145,15 @@ Follow the prompts to create a TypeScript project using the App Directory.
145
145
146
146
` ` ` json
147
147
{
148
+ // other package.json properties
148
149
" devDependencies" : { " @trigger.dev/cli" : " workspace:*" }
149
150
}
150
151
` ` `
151
152
152
153
5. Open a new terminal window, navigate into the example, and initialize the CLI:
153
154
154
155
` ` ` sh
155
- cd examples/your-newly-created-nextjs-project
156
+ cd examples/test-cli
156
157
pnpm i
157
158
pnpm exec trigger-cli init
158
159
` ` `
Original file line number Diff line number Diff line change @@ -280,10 +280,7 @@ async function detectUseOfSrcDir(path: string): Promise<boolean> {
280
280
281
281
// Detect the use of pages or app dir in the Next.js project
282
282
// Import the next.config.js file and check for experimental: { appDir: true }
283
- async function detectPagesOrAppDir (
284
- path : string ,
285
- usesSrcDir = false ,
286
- ) : Promise < "pages" | "app" > {
283
+ async function detectPagesOrAppDir ( path : string , usesSrcDir = false ) : Promise < "pages" | "app" > {
287
284
const nextConfigPath = pathModule . join ( path , "next.config.js" ) ;
288
285
const importedConfig = await import ( pathToFileURL ( nextConfigPath ) . toString ( ) ) . catch ( ( ) => ( { } ) ) ;
289
286
@@ -554,9 +551,7 @@ export * from "./examples"
554
551
examplesIndexContent
555
552
) ;
556
553
557
- logger . success (
558
- `✅ Created example job at ${ usesSrcDir ? "src/" : "" } jobs/examples/examplesFileName`
559
- ) ;
554
+ logger . success ( `✅ Created example job at ${ usesSrcDir ? "src/" : "" } jobs/examples.ts` ) ;
560
555
}
561
556
}
562
557
You can’t perform that action at this time.
0 commit comments