-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
CLI: Add Stencil init support #31205
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
base: next
Are you sure you want to change the base?
CLI: Add Stencil init support #31205
Conversation
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.
15 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
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.
15 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
'stencil/default-ts': { | ||
name: 'StencilJS CLI Latest (Vite | TypeScript)', | ||
script: 'npm init stencil@latest component {{beforeDir}}', | ||
// TODO: The community template does not provide standard stories, which is required for e2e tests. Reenable once it does. | ||
inDevelopment: true, | ||
expected: { | ||
framework: '@stencil/storybook-plugin', | ||
renderer: '@stencil/storybook-plugin', | ||
builder: '@stencil/storybook-plugin', | ||
}, | ||
// TODO: The community template does not provide standard stories, which is required for e2e tests. | ||
skipTasks: ['e2e-tests', 'e2e-tests-dev', 'bench', 'vitest-integration'], | ||
}, |
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.
logic: The template uses '@stencil/storybook-plugin' for all three roles (framework, renderer, builder) which is unusual. Consider if this is the intended architecture or if separate packages should be used like other templates.
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.
I oriented myself to storybook-framework-qwik
which has all in one as well.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Thanks so much Christian!! I broke my wrist so I'm running at half speed--or less--but I'll kick the tires and try to figure out what it takes to get this merged over the coming week. Really exciting!!! 🙀 |
@shilman thanks so much! No rush—focus on healing your wrist first. Even without CLI integration, the onboarding process is already super straightforward. |
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.
15 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
@@ -19,7 +19,7 @@ const projectJson = (name: string, framework: string, tags: string[]) => ({ | |||
'links', | |||
'onboarding', | |||
'blocks', | |||
...(!['storybook-framework-qwik', 'storybook-solidjs-vite'].includes(framework) | |||
...(!['storybook-framework-qwik', 'storybook-solidjs-vite', '@stencil/storybook-plugin'].includes(framework) |
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.
style: Consider extracting special framework packages into a constant array to avoid repetition and make maintenance easier
View your CI Pipeline Execution ↗ for commit f437732.
☁️ Nx Cloud last updated this comment at |
Hi Christian, thanks for your patience on this. I did a canary release and tested it out in a fresh Stencil "component" project.
I found a few problems that we should address. I didn't dig into debug any of these yet:
Let me know what you think and if you'd like to discuss or need any help resolving any of these issues! I'm also happy to create a new canary whenever it's useful. |
@shilman thanks for testing it. I will take a look and report back. |
@christian-bromann do you have an update? |
Not yet, I have been busy with some other tasks but am planning to get back to this. |
Closes #
What I did
The Stencil team has published support for integrating into Storybook. We are still working out the details and adding docs to our project page but I wanted to start the process on the Storybook site to allow creating Storybook projects with Stencil. For now I've copied basically what Qwik has been doing to integrate into the CLI. I may have made changes that were not necessary so please advise what is required here. Thank you!
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Running
yarn task --task sandbox --start-from auto --template stencil/default-ts
fails due to:Running
yarn task --task sandbox --start-from auto --template react-vite/default-ts
was fine.Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.🦋 Canary release
This pull request has been released as version
0.0.0-pr-31205-sha-f4377325
. Try it out in a new sandbox by runningnpx [email protected] sandbox
or in an existing project withnpx [email protected] upgrade
.More information
0.0.0-pr-31205-sha-f4377325
cb/storybook
f4377325
1745979849
)To request a new release of this pull request, mention the
@storybookjs/core
team.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=31205
Greptile Summary
Adds support for Stencil framework in Storybook's CLI, including framework detection and sandbox template setup, though there are configuration issues to resolve.
code/core/src/cli/project_types.ts
using '@stencil/core' packagecode/core/src/common/utils/get-storybook-info.ts
with '@stencil/storybook-plugin'code/lib/cli-storybook/src/sandbox-templates.ts
(marked as inDevelopment)docs/get-started/install.mdx
needs correction for incorrect README link referencing Qwik💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!