File tree Expand file tree Collapse file tree
packages/cli/src/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ pnpm run dev
1361363. Create a new temporary Next.js app in examples directory
137137
138138` ` ` sh
139- pnpm create next-app@latest
139+ pnpm create next-app@latest test-cli --ts --no-eslint --tailwind --app --src-dir --import-alias " @/* "
140140` ` `
141141
142142Follow 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.
145145
146146` ` ` json
147147{
148+ // other package.json properties
148149 " devDependencies" : { " @trigger.dev/cli" : " workspace:*" }
149150}
150151` ` `
151152
1521535. Open a new terminal window, navigate into the example, and initialize the CLI:
153154
154155` ` ` sh
155- cd examples/your-newly-created-nextjs-project
156+ cd examples/test-cli
156157pnpm i
157158pnpm exec trigger-cli init
158159` ` `
Original file line number Diff line number Diff line change @@ -280,10 +280,7 @@ async function detectUseOfSrcDir(path: string): Promise<boolean> {
280280
281281// Detect the use of pages or app dir in the Next.js project
282282// 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" > {
287284 const nextConfigPath = pathModule . join ( path , "next.config.js" ) ;
288285 const importedConfig = await import ( pathToFileURL ( nextConfigPath ) . toString ( ) ) . catch ( ( ) => ( { } ) ) ;
289286
@@ -554,9 +551,7 @@ export * from "./examples"
554551 examplesIndexContent
555552 ) ;
556553
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` ) ;
560555 }
561556}
562557
You can’t perform that action at this time.
0 commit comments