Open backbone87 opened 5 years ago
I didn't like the project level storybook dir. I actually prefer the src/stories
, but the storybook config still needed to exist somewhere.
i am fine with src/stories
for the proposed place for stories by the generator, this can be changed easily anyway.
this is just about the config dir and storybook-static dir.
@LinusBorg as a vue expert, what is your recommendation?
edit: the thing i would change about src/stories
, or better the config: read stories from the whole src
, not just src/stories
@backbone87 Did you come up with a structure? I am open to it.
Why not use .storybook/main.js
directory?
https://storybook.js.org/docs/guides/guide-vue/#step-3-create-the-main-file
I have to do it:
vue.config.js
const path = require('path');
module.exports = {
chainWebpack: (config) => {
config.module.rule('eslint').exclude
.add(path.resolve('.storybook/main'))
.end();
},
};
package.json
...
"storybook:build": "vue-cli-service storybook:build -c .storybook -o .storybook/dist",
"storybook:serve": "vue-cli-service storybook:serve -p 6006 -c .storybook"
...
Is there any particular reason why the additional config dir is added insteadof just a project level storybook dir? AFAIK vue-cli doesnt promote the usage of a config dir. If we decide to do this, it would make sense to also change the storybook-static dir to storybook/dist to be in line with vue-cli's project layout.