Skip to content
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

Updates for stencil storybook angular #711

Merged

Conversation

marckassay
Copy link
Contributor

Hello. The essence of this PR unconditionally enables Webpack 5, Babel 7 for Storybook, but just for Stencil package of this repository. No Nx migration additions have been developed since this is my first Nx development which I'm still learning it's internal api. To mention one of the several reasons for this development on my part is to use .tsx files for Storybook stories without lit-html, which this PR introduces, but with one caveat. That caveat is in the __componentFileName__.stories.tsx.template file along with a comment above it.

Feel free to ask any questions and or make edits. Thanks again for this this repo!

Also, prior to using the script below, run verdaccio locally and: clone, build and publish (/dist/packages/stencil package) with semver version of choice. Below I used 14.0.3-local.1. This script is a smoke test that I used and should launch Storybook with a single story generated.

npx create-nx-workspace@latest --name nx-workspace --cli nx --preset angular --appName web --style css --packageManager npm --nxCloud false
cd nx-workspace
npm add @nxext/stencil@14.0.3-local.1 --save
git add .
git commit -m "post: npm add @nxext/stencil"
npx nx generate @nxext/stencil:library nx-project --buildable --style css
git add .
git commit -m "post: nx generate @nxext/stencil:library nx-project"
npx nx generate @nxext/stencil:storybook-configuration nx-project --configureCypress true
git add .
git commit -m "post: nx generate @nxext/stencil:storybook-configuration"
npx nx generate @nxext/stencil:component --project nx-project --name test-component
git add .
git commit -m "post: nx generate @nxext/stencil:component"
npx nx generate @nxext/stencil:add-outputtarget --outputType angular --projectName nx-project
git add .
git commit -m "post: nx generate @nxext/stencil:add-outputtarget"
npx nx run nx-project:build
git add .
git commit -m "post: nx run nx-project-build"
npx nx run nx-project:test
npx nx run nx-project:storybook

@nx-cloud
Copy link

nx-cloud bot commented Jun 10, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 8c80385. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

@DominikPieper
Copy link
Member

Oh great, thank you :-)

@DominikPieper DominikPieper merged commit 965af9b into nxext:main Jun 14, 2022
@marckassay marckassay deleted the updates-for-stencil-storybook-angular branch June 14, 2022 13:13
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