-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
CLI support for Vue #1287
CLI support for Vue #1287
Conversation
Codecov Report
@@ Coverage Diff @@
## add-app-vue #1287 +/- ##
===============================================
- Coverage 14.41% 14.39% -0.02%
===============================================
Files 232 232
Lines 4897 4903 +6
Branches 612 610 -2
===============================================
Hits 706 706
- Misses 3677 3682 +5
- Partials 514 515 +1
Continue to review full report at Codecov.
|
Wow, you've set some goals for yourself! Storybook is really heavy on webpack. Do know the CLI needs a huge overhaul, but a generator for it like this would be fantastic to have for the Storybook for Vue launch! Which I think can happen real soon. |
lib/cli/lib/project_types.js
Outdated
@@ -8,6 +8,8 @@ module.exports = { | |||
REACT_PROJECT: 'REACT_PROJECT', | |||
WEBPACK_REACT: 'WEBPACK_REACT', | |||
VUE: 'VUE', | |||
WEBPACK_VUE: 'WEBPACK_VUE', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WEBPACK_VUE
and BROWSERIFY_VUE
might refactor as SFO_VUE
(Single file components) due to same logic.
lib/cli/generators/VUE/index.js
Outdated
const latestVersion = require('latest-version'); | ||
|
||
module.exports = latestVersion('@storybook/vue').then(version => { | ||
mergeDirs(path.resolve(__dirname, 'template/'), '.', 'overwrite'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit: I think /
does not need in path.resolve(__dirname, 'template/')
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abouthiroppy thank you for your reviewing!
Indeed. :)
done! |
NOTE: Vue.js standard style
Issue:
What I did
I supported
getstorybook
for vue app project with generatedvue-cli
.How to test
vue init [template-type] xxx
cd xxx
getstorybook
npm run storybook
TODO (support template-type)
Reference
https://github.com/vuejs-templates