Allow user to set storybook version in the CLI
fernandoagarcia opened this issue ยท 11 comments
I was interested in trying out some of the new addons for Storybook in 5.2.0-beta. Is it possible to use that storybook version with this CLI Plugin?
Ha, I came here to ask this :) I'd like to test the new Component Story Format within an existing setup using this plugin.
It would be nice to be able to specify a version in the CLI
I think I have a temporary solution, until this plugin is officially updated (presumably when storybook 5.2 will be officially released). I have forked this repo and updated versions of storybook related packages in package.json
and preset.js
. The repo is: https://github.com/node-ex/vue-cli-plugin-storybook
Steps:
npm uninstall vue-cli-plugin-storybook
npm install --save-dev git+ssh://git@github.com:node-ex/vue-cli-plugin-storybook.git#v0.6.3
vue add storybook
# Delete generated files, if not needed
# The first run of the following command generated a lot of ESLint errors, consequent runs did not generate any...
npx vue-cli-service storybook:serve -p 6006
You can fork the original repository and follow the provided steps as well :)
Unfortunately, I think the correct way to do this would be what @Emobe said:
It would be nice to be able to specify a version in the CLI
@pksunkara I totally agree, but OP wanted to try out new addons and provided hack should be sufficient
@node-ex I had an error in step 2 when trying to install from your repo. Any idea?
@crusenov It is just a guess, but npm install
command contains SSH link to a particular release of the GitHub repository. It is possible, that you did not add your public SSH key to your GitHub account, you can find more information here: https://help.github.com/en/articles/connecting-to-github-with-ssh
Maybe it is possible to make this work with an HTTP protocol, but I did not test it.
@crusenov You can just create your own fork for now. It's just a version change within package.json + generator
Should we just update the dependencies now 5.2 is released as latest?
v1 is now released which should work with any Storybook version >=4.1.0