Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Including scss mixins #16

Closed
chanar opened this issue Apr 4, 2019 · 3 comments
Closed

Including scss mixins #16

chanar opened this issue Apr 4, 2019 · 3 comments

Comments

@chanar
Copy link
Contributor

chanar commented Apr 4, 2019

With aybolit setup, where should I include scss mixins/variables that are being used throughout multiple packages?

Before I used sass-resources-loader in webpack to load the mixins to all scss included.

@web-padawan
Copy link
Owner

In the monorepo, everything is a package. So, I would recommend placing Sass mixins to a separate package, which could be marked as "private": true in case there is nothing to publish to npm.

See for example how mwc-button web component imports SCSS for icon from the other package.

@chanar
Copy link
Contributor Author

chanar commented Apr 5, 2019

But how would you separate it from the file structure that the current ./scripts/build-styling.sh is doing?

/scss -> /components/styles

Should I use it only on certain packages then?

I also have now

/packages/app1/scss/global-styles-for-app1
/packages/app2/scss/gloval-styles-for-app2

that needs to be compiled and included in /packages/app2/src/index.js

There is no components for them as all components are in /components.

Is it safe to say that the structure you have built is only for this specific /packages/* setup? The aybolit idea is to be something like Vaadin but much more easily extendable as seen in /core where the base has been set and all other packages extend it.

@chanar
Copy link
Contributor Author

chanar commented May 17, 2019

Closing this issue as we have found an agreement of file structures for now

@chanar chanar closed this as completed May 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants