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

Styleguide global assets, like js and scss outside of components? #62

Open
jonathanrbowman opened this issue Sep 14, 2017 · 1 comment

Comments

@jonathanrbowman
Copy link

jonathanrbowman commented Sep 14, 2017

First, thanks for making this! It seems like it could be really helpful if I can get if figured out.

Loading the styleguide to view a component shows the css and javascript that goes along with that component, but what about other javascript and css, not contained within the component folder?

For example, a component that relies on styles not kept within its own stylesheet. Like, a card that uses .o-heading objects. I have a css file for headings, but that doesn't belong with the card component. This means it doesn't get loaded on the styleguide page, though. It would only pull it in if I @import all my scss at the top of every component? I'm sure I'm missing something there.

Also, say the card uses another, separate js file like some custom functions to interact with an API. These functions are used elsewhere, not just with this component so they don't belong in the component folder. How do you get that included on the styleguide page, as well?

@kitop
Copy link
Collaborator

kitop commented Sep 14, 2017

Hi @jonathanrbowman, thanks for your words!

Regarding the external CSS in the stylesheet, there's a configuration option for including that: https://github.com/devnacho/mountain_view#global-stylesheets
Hope that helps, and do not hesitate to ask if any further questions.

Regarding JS, there's currently no option for that. But seems like it could be a good idea to add one. Happy to accept a PR if you wanna take on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants