nxext / nx-extensions

Nx Extensions for Stencil, Svelte, SolidJS, Preact, Ionic, and Capacitor
MIT License
465 stars 102 forks source link

Stencil: missing `@nrwl/storybook` peerDependency when adding `@nxext/stencil` #831

Open dgonzalezr opened 2 years ago

dgonzalezr commented 2 years ago

Describe the bug When adding the @nxext/stencil to a project, if the @nrwl/storybook is not installed we're unable to use nxext/stencil generators:

CleanShot 2022-11-03 at 11 42 56

To Reproduce

  1. Create an Nx workspace: npx create-nx-workspace@latest myorg --preset=ts
  2. Make sure to downgrade to Nx version 14.x since nxext/stencil is not yet compatible with Nx v15:
    "devDependencies": {
    "@nrwl/cli": "14.8.6",
    "@nrwl/js": "14.8.6",
    "@nrwl/workspace": "14.8.6",
    "nx": "14.8.6",
    "prettier": "^2.7.1",
    "typescript": "~4.8.4"
    }
  3. Add @nxext/stencil: npm i -D @nxext/stencil
  4. Generate a Stencil library: nx g @nxext/stencil:lib components --buildable --publishable

Expected behavior Adding the @nxext/stencil all dependencies needed should be added as well if they're not yet installed.

DominikPieper commented 2 years ago

Hey, I experiment with installing it dynamically while the generator runs. It's not a hard dependency yet cause I don't want to pin too many Nx packages in defined versions cause that brings other kinds of chaos. ^^'

I rework some stuff around the storybook integration for v15, and I'll add this to the list for that