-
Notifications
You must be signed in to change notification settings - Fork 1
ian/startup 131 add styleguide to default repo creation #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ian/startup 131 add styleguide to default repo creation #47
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
| let includeStorybook = false | |
| let includeStorybook = !promptedForName |
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.