Skip to content

Commit

Permalink
Fix Nextjs project detection
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Oct 2, 2023
1 parent 8c7d53c commit f077780
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate-sandboxes-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: yarn wait-on http://localhost:6001
working-directory: ./code
- name: Generate
run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease
run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease --debug
working-directory: ./code
- name: Publish
run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=next
Expand Down
4 changes: 1 addition & 3 deletions code/lib/cli/src/project_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ export const supportedTemplates: TemplateConfiguration[] = [
},
{
preset: ProjectType.NEXTJS,
dependencies: {
next: (versionRange) => eqMajor(versionRange, 9) || gtMajor(versionRange, 9),
},
dependencies: ['next'],
matcherFunction: ({ dependencies }) => {
return dependencies.every(Boolean);
},
Expand Down
4 changes: 4 additions & 0 deletions scripts/sandbox/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ const runGenerators = async (
localRegistry = true,
debug = false
) => {
if (debug) {
console.log('Debug mode enabled. Verbose logs will be printed to the console.');
}

console.log(`🤹‍♂️ Generating sandboxes with a concurrency of ${maxConcurrentTasks}`);

const limit = pLimit(maxConcurrentTasks);
Expand Down

0 comments on commit f077780

Please sign in to comment.