Skip to content
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

Merged

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented Jun 15, 2017

Issue:

What I did

I supported getstorybook for vue app project with generated vue-cli.

How to test

  1. run vue init [template-type] xxx
  2. run cd xxx
  3. run getstorybook
  4. run npm run storybook

TODO (support template-type)

  • webpack-simple
  • webpack
  • browserify-simple
  • browserify
  • pwa

Reference

@codecov
Copy link

codecov bot commented Jun 15, 2017

Codecov Report

Merging #1287 into add-app-vue will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@               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
Impacted Files Coverage Δ
lib/cli/lib/project_types.js 0% <ø> (ø) ⬆️
lib/cli/lib/detect.js 0% <0%> (ø) ⬆️
lib/cli/bin/generate.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/containers/left_panel.js 20% <0%> (ø) ⬆️
lib/ui/src/modules/ui/routes.js 0% <0%> (ø) ⬆️
addons/info/src/components/markdown/code.js 0% <0%> (ø) ⬆️
addons/knobs/src/components/PropField.js 10.86% <0%> (ø) ⬆️
addons/info/src/components/PropTable.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/containers/down_panel.js 23.52% <0%> (ø) ⬆️
addons/storyshots/src/storybook-channel-mock.js 0% <0%> (ø) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 765d394...3e12ba1. Read the comment docs.

@ndelangen
Copy link
Member

Wow, you've set some goals for yourself!

Storybook is really heavy on webpack.
Is Browserify a big thing? I'm OK with sticking to supporting webpack only.

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.

@@ -8,6 +8,8 @@ module.exports = {
REACT_PROJECT: 'REACT_PROJECT',
WEBPACK_REACT: 'WEBPACK_REACT',
VUE: 'VUE',
WEBPACK_VUE: 'WEBPACK_VUE',
Copy link
Member Author

@kazupon kazupon Jun 16, 2017

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.

const latestVersion = require('latest-version');

module.exports = latestVersion('@storybook/vue').then(version => {
mergeDirs(path.resolve(__dirname, 'template/'), '.', 'overwrite');
Copy link

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/').

Copy link
Member Author

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. :)

@ndelangen ndelangen changed the title WIP: getstrorybook support for Vue WIP: CLI support for Vue Jun 16, 2017
@kazupon
Copy link
Member Author

kazupon commented Jun 17, 2017

done!

@kazupon kazupon changed the title WIP: CLI support for Vue CLI support for Vue Jun 17, 2017
NOTE:
  Vue.js standard style
@alexandrebodin alexandrebodin removed the request for review from ndelangen June 18, 2017 13:11
@alexandrebodin alexandrebodin merged commit 040f4e0 into storybookjs:add-app-vue Jun 18, 2017
@kazupon kazupon deleted the getstorybook-support-for-vue branch July 16, 2017 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants