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

Add note for need of main package dependecies #2203

Closed
wants to merge 4 commits into from

Conversation

mccullochk
Copy link
Contributor

Issue

If you clone the repository and only run yarn install in the /docs directory and not in the root (/) directory, you get the following error.

ReferenceError: Unknown plugin "transform-runtime" specified in "/Users/_name_/Documents/personal/projects/storybook/.babelrc" at 0, attempted to resolve relative to "/Users/_name_/Documents/personal/projects/storybook"

What I did

Documented the dependency need in hopes of helping future users avoid the ReferenceError

@codecov
Copy link

codecov bot commented Nov 1, 2017

Codecov Report

Merging #2203 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2203   +/-   ##
=======================================
  Coverage   21.19%   21.19%           
=======================================
  Files         283      283           
  Lines        6156     6156           
  Branches      732      731    -1     
=======================================
  Hits         1305     1305           
+ Misses       4301     4292    -9     
- Partials      550      559    +9
Impacted Files Coverage Δ
app/vue/src/server/config/babel.js 0% <0%> (-100%) ⬇️
app/vue/src/server/babel_config.js 0% <0%> (-77.42%) ⬇️
addons/info/src/components/markdown/htags.js 30% <0%> (ø) ⬆️
app/react/src/client/preview/element_check.js 41.17% <0%> (ø) ⬆️
addons/a11y/src/components/Report/Rules.js 0% <0%> (ø) ⬆️
app/react-native/src/preview/story_kind.js 0% <0%> (ø) ⬆️
addons/a11y/src/components/Report/Info.js 0% <0%> (ø) ⬆️
addons/knobs/src/components/PropField.js 10.63% <0%> (ø) ⬆️
lib/ui/src/modules/ui/configs/init_panels.js 25% <0%> (ø) ⬆️
addons/a11y/src/components/Report/Tags.js 0% <0%> (ø) ⬆️
... and 23 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 633cf8b...f519d4e. Read the comment docs.

@ndelangen
Copy link
Member

Thanks @mccullochk !

Maybe we're just missing a few dependencies in the docs/package.json. If you add the missing dependencies, does the local docs development work without bootstrapping the core?

I don't think this flow where you need to bootstrap the core in order to develop on the docs is the intention.

@ndelangen ndelangen added maintenance User-facing maintenance tasks documentation labels Nov 1, 2017
@ndelangen ndelangen self-requested a review November 1, 2017 07:28
@mccullochk
Copy link
Contributor Author

@ndelangen, it actually doesn't look like there is a missing dependency. I added all the core dependencies to the package.json in /docs but the error still persists. However, when I import the .babelrc file from the core it works without error.

@ndelangen
Copy link
Member

Ah so basicly what we need to do is create a .babelrc file in /docs ? And that fixes the problem? 👍

@mccullochk
Copy link
Contributor Author

Yes. Sorry if my first solution was misleading. I can change this pull request to include a .babelrc in /docs if you like?

The .babelrc from the core:

{
  "presets": ["env", "stage-0", "react"],
  "plugins": [
    ["transform-runtime", {
      "polyfill": false,
      "regenerator": true
    }]
  ]
}

@Hypnosphi
Copy link
Member

Yeah, that would be great

@danielduan
Copy link
Member

@Hypnosphi is this still relevant with your upgrade of gatsby?

@Hypnosphi
Copy link
Member

I didn't touch the Babel stuff, so probably yes

@danielduan
Copy link
Member

@mccullochk do you still want to take care of this one?

@Hypnosphi
Copy link
Member

@ndelangen are you sure we don’t want to add docs/.babelrc instead?

Copy link
Member

@Hypnosphi Hypnosphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See conversation

@ndelangen
Copy link
Member

Fine either way, thb

What do you prefer?

@codecov-io
Copy link

codecov-io commented Nov 15, 2017

Codecov Report

Merging #2203 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2203   +/-   ##
=======================================
  Coverage   32.68%   32.68%           
=======================================
  Files         398      398           
  Lines        8838     8838           
  Branches      962      964    +2     
=======================================
  Hits         2889     2889           
+ Misses       5278     5258   -20     
- Partials      671      691   +20
Impacted Files Coverage Δ
addons/a11y/src/components/Report/Tags.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/components/menu_item.js 19.14% <0%> (ø) ⬆️
addons/graphql/src/components/FullScreen/index.js 0% <0%> (ø) ⬆️
...ddons/actions/src/containers/ActionLogger/index.js 49.25% <0%> (ø) ⬆️
lib/ui/src/modules/api/configs/init_api.js 40.42% <0%> (ø) ⬆️
.../src/modules/ui/components/stories_panel/header.js 29.62% <0%> (ø) ⬆️
.../ui/components/stories_panel/stories_tree/index.js 41.98% <0%> (ø) ⬆️
addons/knobs/src/react/WrapStory.js 49.42% <0%> (ø) ⬆️
lib/codemod/src/transforms/move-buildin-addons.js 46.87% <0%> (ø) ⬆️
addons/info/src/components/makeTableComponent.js 67.46% <0%> (ø) ⬆️
... and 37 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 ff220df...22c26e7. Read the comment docs.

@Hypnosphi
Copy link
Member

I'd say we should either include docs into workspaces, or keep it as an isolated package. In the latter case, it should work without bootstrapping everything else

@ndelangen
Copy link
Member

Ok, my gut feeling would be to keep them isolated, do you agree?

@Hypnosphi
Copy link
Member

Sure

@ndelangen
Copy link
Member

@mccullochk Is this something you could do?

We'd like to be able to install & run the docs -WITHOUT- having to bootstrap the core.
It seems we just need to add a .babelrc for that in the docs folder.

#2203 (comment)

👍

@Hypnosphi
Copy link
Member

Superseded by #2585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants