-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
1cc5acf
to
b54e98a
Compare
fc172d2
to
a65f190
Compare
2965084
to
0a768df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storybook and playground did not load for me, so could not really check much.
package.json
Outdated
"react", | ||
"ui", | ||
"ux" | ||
"name": "turborepo-basic-shared", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, there's a lot of new dependencies so it makes sense idk
"classnames": "^2.2.6", | ||
"react-table": "^7.1.0", | ||
"react-transition-group": "^4.1.1" | ||
"build": "turbo run build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well ok.. idk anymore..
I ran storybook from react package, seemed ok.
Then i ran again yarn dev
and now it gave no errors :/ I still have all those prettier changes too, so not sure what happened here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn dev
should be fixed now.
Those errors were because the @itwin/itwinui-react
package needs to be built before it can be used in the vite playground. So I added ^build
dependency and removed the --parallel
flag.
Storybook should not be affected, I think it might have been because you had some other storybook running somewhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repo starts, unit test runs and passes.
Main concerns:
- Why
yarn dev
starts both playground and storybook? Is there a reason why it's more useful to look at both when coding/creating than just playground or storybook? - Visual tests are missing (at least I didn't find how to run them). Also creevey as is won't run on Mac M1, we could use this new repo opportunity to switch to other testing suite or fix creevey.
That's the default behavior of turborepo and it also makes sense to me. When I'm working on any component, I have both storybook and test app running. When we add website to this repo, it will also start with the same command
What visual tests are missing? Good point about using this opportunity. I don't think we will be able to fix creevey but we could switch to cypress or something. Update: I was playing around with using stories as cypress tests and got it running after a couple hours. But it's a lot of changes, so maybe it should be in a separate PR? |
I've fixed linting/formatting issues by making the following changes:
|
7bab9f8
to
be2eee7
Compare
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin | ||
'plugin:react-hooks/recommended', | ||
'plugin:storybook/recommended', | ||
'prettier', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we had this before too plugin:prettier/recommended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
], | ||
rules: { | ||
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs | ||
'react/prop-types': 'off', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here this "prettier/prettier": [ 1 ],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,4 @@ | |||
{ | |||
"extends": "configs/tsconfig.base.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this path correct? it shows error to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is correct. configs
is the name of the package where I've moved this file.
Screen.Recording.2022-04-21.at.9.59.13.AM.mov
Linter seems to work fine. I have tried messing up code and checking if on save fixes minor things. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
Welcome, Turborepo!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Monorepo it is
Converted this repo into a monorepo using turborepo on top of yarn workspaces. Directory structure is split into apps/ and packages/. - Moved all iTwinUI-react and config files into packages/ - Added a vite playground under apps/ which uses the linked itwinui-react package just for testing components in a more reliable setting compared to storybook. - In the future, the documentation website folder will also live under apps/ lockfile was recreated so there were a lot of random changes I had to make for new deps, mostly in tests.
Converted this repo into a monorepo using turborepo on top of yarn workspaces. Directory structure is split into
apps/
andpackages/
.packages/
apps/
which uses the linked itwinui-react package just for testing components in a more reliable setting compared to storybook.website
folder will also live underapps/
Most of the changes in this PR are simply additions from turborepo/vite and moving files around (git should show those as "renamed").
The only real "changes" are listed below:
package.json
.cjs
/esm
folders instead oflib
so that it works with symlinks. There is no need to copypackage.json
intolib
anymore.webpack@5
in the rootpackage.json
:ReactNodeArray
is deprecated and was showing an error inBreadcrumbs
so I changed it toReactNode[]
.A lot of those issues have nothing to do with turborepo but I think they started appearing because dependencies were updated when lockfile was moved.
Best way to test these changes:
yarn
to install everything.yarn dev
to start vite playground and storybook together.For running any bespoke commands, you can
cd
intopackages/itwinui-react
or just run it from the repo root by prefixingyarn workspace @itwin/itwinui-react
.