Closed macrozone closed 8 years ago
@sungwoncho maybe you can help with add import/require in /.storybook/config.js when a new module is created
We need to generate something like this for every module:
function loadStories() {
require('../client/modules/core/components/.stories');
require('../client/modules/comments/components/.stories');
}
But i think that's not so important and I would suggest to release without this. I will work on the other things
@macrozone This seems like a good start. Let's release as a part of 0.4.0
. I personally haven't used storybook and won't be able to test this feature extensively. But the code so far looks good to me. Let me know when it's ready to be merged.
Cool,
We should also discus how to make this optional, if storybook is added by default, etc.
I also think of adding https://github.com/kadirahq/react-storybook-addon-info, but this can be done by modifing the templates.
ok, works now, however, it is not yet optional.
If we make it optional, it should be an option when creating an app.
Then, on every mantra generate/destroy component
we should already know, if this app was created with storybook support. Maybe check if .storybook-folder exists.
Checking .storybook
folder sounds doable. Maybe from 0.4.0, we could even store the info in mantra_cli.yaml
. i.e. storybook: true
.
Personally I wouldn't really mind if CLI generated storybook even though I don't use it. Started https://talk.mantrajs.com/t/should-mantra-cli-generate-storybook-by-default/383. Let's see how people feel.
Hi,
Great work guys.
Could you perhaps release an intermediate version with this as-is, and then release one later with optionality?
@macrozone would you like to do your first release? The release process is automated in release.sh. Maybe we can do 0.3.14.rc1
and later release 0.3.14
.
Let me know your npm, and I will add you to the project.
@sungwoncho https://www.npmjs.com/~macrozone
I saw that you have a 0.4 branch. I forked from master. Should i rebase / merge from 0.4?
@macrozone added you to npm.
yeah. you can bump the release candidate version on 0.4.x and do a release.
ok i did a release and bumped the version.
Everything should included in this PR, including your 0.4 branch. But i do not know whether the release-tag will be transfered.
Can you merge?
@macrozone it seems that git tags do not get merged. Feel free to create a tag again and push to master.
I'll try!
btw. templates in yaml-configs work well so far. 👍
It's also possible to customize storybook-templates which i used to add the "addWithInfo"-plugin
Regarding yaml-configs: I think there is a known issue with customizing publication template, because we are supporting collection2 and astronomy.
All in all, this is a good start and we can implement the last item (make generating of storybook optional) if the users want it. Thanks for the hard work.
fixes https://github.com/mantrajs/mantra-cli/issues/72
Todo: