Skip to content

Conversation

@pyramation
Copy link
Contributor

feat(create-gen-app): add useBoilerplatesConfig option

Summary

Adds a new useBoilerplatesConfig option to both ScaffoldOptions and InspectOptions interfaces. This option controls whether the .boilerplates.json fallback resolution is used when resolving fromPath.

  • When true (default): existing behavior - if fromPath doesn't exist directly, check .boilerplates.json for a base directory to prepend
  • When false: skip .boilerplates.json lookup entirely and use fromPath as-is

This enables callers (like @pgpmjs/core) to explicitly bypass .boilerplates.json resolution when they want to use a specific directory path without fallback behavior, eliminating the need for brittle post-hoc validation.

Review & Testing Checklist for Human

  • Verify backward compatibility: default true should maintain existing behavior for all current consumers
  • Test useBoilerplatesConfig: false actually bypasses .boilerplates.json lookup (no unit tests were added)
  • Confirm the option is properly threaded through all code paths: inspect(), scaffold(), and their internal methods

Notes

This is part of a larger refactoring to move resolution policy control from @pgpmjs/core into create-gen-app for cleaner architecture. A follow-up PR will update @pgpmjs/core to use this new option.

Link to Devin run: https://app.devin.ai/sessions/36e9a9f44158421996d176f2ce90d280
Requested by: Dan Lynch (@pyramation)

…ilerplates.json resolution

Add a new option `useBoilerplatesConfig` to both `ScaffoldOptions` and `InspectOptions`:
- When true (default), if fromPath doesn't exist directly, the resolver will check .boilerplates.json for a base directory to prepend
- When false, .boilerplates.json is ignored and fromPath is used as-is

This allows callers to explicitly bypass .boilerplates.json resolution when they want to use a specific directory path without fallback behavior.
@devin-ai-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit feb6039 into main Dec 25, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants