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

Generate template from lib components #1283

Closed
wants to merge 3 commits into from

Conversation

usulpro
Copy link
Member

@usulpro usulpro commented Jun 15, 2017

Issue: #1266 (comment)

getstroybook should provide the simplest and hackable code sample

What I did

I take the same js files from src and put them into the dist without babel compilation. Then getstorybook uses them with templates. So we'll have the source code of these components in our project after getstorybook. (Same behavior for users, but with the only source of code)

How to test

cd \lib\components
npm link
cd lib\cli
npm link @storybook\components
npm link
cd my_test_getstorybook
create-react-app sample
cd sample
npm link @storybook\cli
where getstorybook
node_modules\.bin\getstorybook -f
yarn add glamorous glamor
npm run storybook

@codecov
Copy link

codecov bot commented Jun 15, 2017

Codecov Report

Merging #1283 into add-lib-components will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@                  Coverage Diff                   @@
##           add-lib-components    #1283      +/-   ##
======================================================
- Coverage               13.79%   13.75%   -0.04%     
======================================================
  Files                     201      202       +1     
  Lines                    4612     4624      +12     
  Branches                  579      512      -67     
======================================================
  Hits                      636      636              
- Misses                   3475     3548      +73     
+ Partials                  501      440      -61
Impacted Files Coverage Δ
lib/components/scripts/template_gen.js 0% <0%> (ø)
app/react/src/client/preview/init.js 0% <0%> (ø) ⬆️
addons/knobs/src/KnobStore.js 6.81% <0%> (ø) ⬆️
addons/knobs/src/components/types/Object.js 5.81% <0%> (ø) ⬆️
addons/knobs/src/KnobManager.js 38.57% <0%> (ø) ⬆️
lib/ui/src/modules/ui/containers/layout.js 12.5% <0%> (ø) ⬆️
addons/knobs/src/components/WrapStory.js 12% <0%> (ø) ⬆️
addons/storyshots/src/storybook-channel-mock.js 0% <0%> (ø) ⬆️
addons/storyshots/src/test-bodies.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/shortcuts/actions/shortcuts.js 6.25% <0%> (ø) ⬆️
... and 22 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 b7a9110...ca075e9. Read the comment docs.

@storybookbot
Copy link
Collaborator

Fails
🚫

PR is not labeled with one of: ["cleanup","breaking","feature","bug","documentation","maintenance","greenkeeper","other"]

Generated by 🚫 dangerJS

@tmeasday
Copy link
Member

I agree with @ndelangen's approach I think: #1266 (comment)

@usulpro usulpro added cli maintenance User-facing maintenance tasks labels Jun 15, 2017
@ndelangen ndelangen force-pushed the add-lib-components branch 3 times, most recently from f15a548 to 436767d Compare June 16, 2017 09:29
@usulpro usulpro closed this Jun 16, 2017
@usulpro usulpro deleted the add-lib-components-patch-2 branch June 16, 2017 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants