suitcss / suit

Style tools for UI components
http://suitcss.github.io/
3.8k stars 229 forks source link

Convert to monorepo using lerna.js #153

Closed mlnmln closed 5 years ago

mlnmln commented 5 years ago

@simonsmith @giuseppeg

Use

To test lerna versioning

To publish

This results in the following version bumps, everything should stay 100% backwards compatible.

 - suitcss-base: 5.0.0 => 5.0.1
 - suitcss-components-arrange: 1.1.1 => 1.1.2
 - suitcss-components-button: 6.0.2 => 6.0.3
 - suitcss-components-flex-embed: 2.0.4 => 2.0.5
 - suitcss-components-grid: 4.0.0 => 4.0.1
 - suitcss-components-test: 1.0.0 => 1.0.1
 - suitcss-components: 2.0.0 => 2.0.1
 - generator-suit: 1.0.2 => 1.0.3
 - suitcss-preprocessor: 4.0.0 => 4.0.1
 - stylelint-config-suitcss: 14.0.0 => 14.0.1
 - stylelint-suitcss: 3.0.0 => 3.0.1
 - suitcss-theme: 1.0.0 => 1.0.1
 - suitcss-utils-after: 1.0.1 => 1.0.2
 - suitcss-utils-align: 1.0.0 => 1.0.1
 - suitcss-utils-before: 1.0.1 => 1.0.2
 - suitcss-utils-display: 1.0.2 => 1.0.3
 - suitcss-utils-flex: 2.0.1 => 2.0.2
 - suitcss-utils-layout: 1.0.1 => 1.0.2
 - suitcss-utils-link: 1.0.1 => 1.0.2
 - suitcss-utils-offset: 1.0.0 => 1.0.1
 - suitcss-utils-position: 1.0.1 => 1.0.2
 - suitcss-utils-size: 2.0.1 => 2.0.2
 - suitcss-utils-text: 1.0.0 => 1.0.1
 - suitcss-utils: 3.0.0 => 3.0.1

This PR is limited in scope intentionally and should be a good foundation for further development work with a monorepo approach.

151

mlnmln commented 5 years ago

@giuseppeg Thanks for the feedback, I added my points.

My main goal now, would be to have a shared understanding of scope / task breakdown.

This PR allows publishing new versions for each package through lerna.js, (hopefully) without breaking anything.

I would strongly recommend splitting any other features (shared test runner, travis config etc., ) into separate issues, unless you think they are critical for landing the PR.

Otherwise we can work on this indefinitely.

simonsmith commented 5 years ago

I think this looks good!

This PR is limited in scope intentionally and should be a good foundation for further development work with a monorepo approach.

I agree with this. This work will give us the push to get carry on with other outstanding issues and we can refine the lerna setup as we go.

Great stuff @mlnmln.

One question regarding the root level package.json. If we were to bump and publish say, suitcss-base do we then need to bump the version in the root package.json and publish the suit package?

mlnmln commented 5 years ago

@simonsmith

I agree with this. This work will give us the push to get carry on with other outstanding issues and we can refine the lerna setup as we go.

Glad to hear.

One question regarding the root level package.json. If we were to bump and publish say, suitcss-base do we then need to bump the version in the root package.json and publish the suit package?

For as long as we use independent versioning, I don't think so, no.

We would only bump the suit package when we want it to use a new version of suitcss-base outside its current caret range.

But to have that more clearly separated I think we should take action on https://github.com/suitcss/suit/pull/153#discussion_r245634938

Then we essentially would have a (private) root package that is not suit. SEE: https://github.com/babel/babel/blob/master/package.json#L3

That package then would take care of shared dev dependencies etc in the long run, but is not installable on its own via npm.

It relatively easy and I could do it during the next couple of days. What do you think?

simonsmith commented 5 years ago

But to have that more clearly separated I think we should take action on #153 (comment)

That seems a logical approach to me, yes

mlnmln commented 5 years ago

@simonsmith @giuseppeg

giuseppeg commented 5 years ago

In the midterm this should be split into a project and a package readme for the suit package only.

@mlnmln I guess that for now we can duplicate it

mlnmln commented 5 years ago

@mlnmln I guess that for now we can duplicate it

works for me.

giuseppeg commented 5 years ago

@simonsmith I just pushed a pre-monorepo branch to save a copy of the status quo. Feel free to merge when you've taken a look at the PR.

@mlnmln thank you a lot for your help and patience :)

simonsmith commented 5 years ago

Looks great to me. Merging