cerebral/classy-ui

Lerna support

CodingDive opened this issue ยท 2 comments

Hey, thank you so much for this library. I finally decided to use it and am currently setting it up! ๐Ÿ˜

I have a project directory like this.

root
โ”œโ”€โ”€ packages
โ”‚   โ”œโ”€โ”€ Client
โ”‚   โ”œโ”€โ”€ DesignSystem

Ideally, I'd like to put the classy-ui.config.js file into the root folder and share it between the Client and the design system. They both will be using classy-ui.

As far as I'm aware, this won't work at the moment but could be supported by either adding three classy-ui config files, extending the two configs of the Client and DesignSystem with the root one, or simply by adding a relative classy-ui config path for the package.json.

What do you think?

I found this code snippet by @christianalfoni in discord. It will require me to create multiple classy-ui.config.js files but I'm completely fine with this.

const libraryConfig = require('my-library/classy-ui.config.js')

module.exports = {
  ...libraryConfig,
  // You can add custom stuff for the project
}

Maybe we can add it to the docs for writing a library.

Hi there @CodingDive ,

Yeah, I think this approach is the best, as it gives most flexibility without having to add anything new ๐Ÿ˜„

Let me know if you get into any issues!

I update the docs a bit to hopefully make this more clear ๐Ÿ˜„