ian/startup 131 add styleguide to default repo creation#47
Merged
Conversation
- Add Storybook as optional template during startupkit init with prompt - Add Storybook to startupkit add command template list - Update paths and dependencies for Storybook integration - Add unit tests for storybook template configuration - All 158 tests passing
Deploying startupkit with
|
| Latest commit: |
15004b2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e03ab5cf.startupkit-975.pages.dev |
| Branch Preview URL: | https://ian-startup-131-add-stylegui.startupkit-975.pages.dev |
Contributor
There was a problem hiding this comment.
2 issues found across 22 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="templates/apps/storybook/package.json">
<violation number="1" location="templates/apps/storybook/package.json:2">
P2: Package name matches a dependency, which creates a self-dependency. npm/pnpm warn or refuse installs when a package depends on itself, so this template can fail to install. Rename the package to avoid matching the Storybook dependency name.</violation>
</file>
<file name="packages/cli/src/cmd/init.ts">
<violation number="1" location="packages/cli/src/cmd/init.ts:180">
P2: Non-interactive init (--name) silently skips Storybook because includeStorybook defaults to false and the prompt never runs. Defaulting to the prompt’s "true" behavior prevents Storybook from being omitted when users pass --name.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| @@ -0,0 +1,35 @@ | |||
| { | |||
| "name": "storybook", | |||
Contributor
There was a problem hiding this comment.
P2: Package name matches a dependency, which creates a self-dependency. npm/pnpm warn or refuse installs when a package depends on itself, so this template can fail to install. Rename the package to avoid matching the Storybook dependency name.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At templates/apps/storybook/package.json, line 2:
<comment>Package name matches a dependency, which creates a self-dependency. npm/pnpm warn or refuse installs when a package depends on itself, so this template can fail to install. Rename the package to avoid matching the Storybook dependency name.</comment>
<file context>
@@ -0,0 +1,35 @@
+{
+ "name": "storybook",
+ "version": "0.0.0",
+ "private": true,
</file context>
| const isCurrentDir = destDir === cwd | ||
|
|
||
| // Step 3: Ask about Storybook | ||
| let includeStorybook = false |
Contributor
There was a problem hiding this comment.
P2: Non-interactive init (--name) silently skips Storybook because includeStorybook defaults to false and the prompt never runs. Defaulting to the prompt’s "true" behavior prevents Storybook from being omitted when users pass --name.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/cli/src/cmd/init.ts, line 180:
<comment>Non-interactive init (--name) silently skips Storybook because includeStorybook defaults to false and the prompt never runs. Defaulting to the prompt’s "true" behavior prevents Storybook from being omitted when users pass --name.</comment>
<file context>
@@ -173,9 +176,24 @@ export async function init(props: {
const isCurrentDir = destDir === cwd
+ // Step 3: Ask about Storybook
+ let includeStorybook = false
+ if (promptedForName) {
+ const { addStorybook } = await inquirer.prompt([
</file context>
Suggested change
| let includeStorybook = false | |
| let includeStorybook = !promptedForName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Adds Storybook as the styleguide in new repos and as an optional app template you can add later. Satisfies Startup-131 by making component docs available out of the box.
Written for commit 15004b2. Summary will update on new commits.