You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure playgrounds work + switch to npm workspaces (#2907)
* bump Next in playground
* convert legacy Link after Next.js bump
* update yarn.lock
* switch to npm workspaces
* move `packages/playground-*` to `playgrounds/*`
* use `npm` instead of `yarn`
* sync package-lock.json
* use node 20 for insiders releases
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+43-43Lines changed: 43 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,14 +19,14 @@ Also make sure that you are making changes to both the `React` and `Vue` version
19
19
20
20
## Monorepo
21
21
22
-
The Headless UI repo is a monorepo using `yarn` workspaces. Note that we are using `yarn`**version 1**.
22
+
The Headless UI repo is a monorepo using `npm` workspaces.
23
23
24
24
## Installation
25
25
26
-
You only require a `yarn install` in the root directory to install everything you need.
26
+
You only require a `npm install` in the root directory to install everything you need.
27
27
28
28
```sh
29
-
yarn install
29
+
npm install
30
30
```
31
31
32
32
## Coding standards
@@ -35,28 +35,28 @@ We use `prettier` for making sure that the codebase is formatted consistently.
35
35
To automatically fix any style violations in your code, you can run:
36
36
37
37
```sh
38
-
yarn lint
38
+
npm lint
39
39
```
40
40
41
41
**Note**: Whenever you commit, the lint check will run on all staged files.
42
-
**Note**: In CI, we will only check your code, and not write with the formatted files. If you want to just check, then you can either run `yarn lint-check` or `CI=true yarn lint`
42
+
**Note**: In CI, we will only check your code, and not write with the formatted files. If you want to just check, then you can either run `npm run lint-check` or `CI=true npm run lint`
43
43
44
44
## Running tests
45
45
46
46
You can run the test suite using the following commands:
47
47
48
48
```sh
49
-
yarntest
49
+
npm runtest
50
50
```
51
51
52
52
You can also run them for React or Vue individually:
53
53
54
54
```sh
55
-
yarn react test
55
+
npm run react test
56
56
57
57
# or
58
58
59
-
yarn vue test
59
+
npm run vue test
60
60
```
61
61
62
62
Please ensure that the tests are passing when submitting a pull request. If you're adding new features to Headless UI, please include tests.
@@ -68,11 +68,11 @@ Currently the `React` playground (located in `packages/playground-react`) is a N
68
68
You can launch them by running:
69
69
70
70
```sh
71
-
yarn react playground
71
+
npm run react playground
72
72
73
73
# or
74
74
75
-
yarn vue playground
75
+
npm run vue playground
76
76
```
77
77
78
78
This will also start the necessary watchers so that you don't have to care about them.
@@ -81,41 +81,41 @@ This will also start the necessary watchers so that you don't have to care about
81
81
82
82
Global scripts, and some aliases:
83
83
84
-
-`yarn install`: install all dependencies for all packages
85
-
-`yarn clean`: this will call all `yarn {package} clean` commands
86
-
-`yarn build`: this will call all `yarn {package} build` commands
87
-
-`yarn lint`: this will `lint` all packages
88
-
-`yarn test`: this will `test` all packages
89
-
-`yarn test`: run all jest tests
90
-
-`yarn test --watch`: run all jest tests in interactive mode
91
-
-`yarn test tabs`: run all jest tests filtered by `tabs`
92
-
-`yarn test tabs --watch`: run all jest tests in interactive mode filtered by `tabs`
84
+
-`npm install`: install all dependencies for all packages
85
+
-`npm run clean`: this will call all `npm run {package} clean` commands
86
+
-`npm run build`: this will call all `npm run {package} build` commands
87
+
-`npm run lint`: this will `lint` all packages
88
+
-`npm run test`: this will `test` all packages
89
+
-`npm run test`: run all jest tests
90
+
-`npm run test --watch`: run all jest tests in interactive mode
91
+
-`npm run test tabs`: run all jest tests filtered by `tabs`
92
+
-`npm run test tabs --watch`: run all jest tests in interactive mode filtered by `tabs`
93
93
94
94
Scripts per package:
95
95
96
-
-`yarn react`: Prefix to run anything in the `@headlessui/react` package
97
-
-`yarn react test`: run all jest tests
98
-
-`yarn react test --watch`: run all jest tests in interactive mode
99
-
-`yarn react test tabs`: run all jest tests filtered by `tabs`
100
-
-`yarn react test tabs --watch`: run all jest tests in interactive mode filtered by `tabs`
101
-
-`yarn react build`: build the final artefacts
102
-
-`yarn react lint`: validate and fix the react codebase using prettier
103
-
-`yarn react watch`: start a watcher for the react esm build
104
-
-**Note**: this will be executed for you when using the `yarn react playground`
96
+
-`npm run react`: Prefix to run anything in the `@headlessui/react` package
97
+
-`npm run react test`: run all jest tests
98
+
-`npm run react test --watch`: run all jest tests in interactive mode
99
+
-`npm run react test tabs`: run all jest tests filtered by `tabs`
100
+
-`npm run react test tabs --watch`: run all jest tests in interactive mode filtered by `tabs`
101
+
-`npm run react build`: build the final artefacts
102
+
-`npm run react lint`: validate and fix the react codebase using prettier
103
+
-`npm run react watch`: start a watcher for the react esm build
104
+
-**Note**: this will be executed for you when using the `npm run react playground`
105
105
-**Note**: this is not required for jest. You will probably never need this
106
-
-`yarn react playground`: (alias) start a development server in the `playground-react` package
107
-
-**Note**: this will also run `yarn react watch` for you, which means that you only need to execute `yarn react playground`
108
-
-`yarn react clean`: this will remove `dist` files
109
-
-`yarn vue`: Prefix to run anything in the `@headlessui/vue` package
110
-
-`yarn vue test`: run all jest tests
111
-
-`yarn vue test --watch`: run all jest tests in interactive mode
112
-
-`yarn vue test tabs`: run all jest tests filtered by `tabs`
113
-
-`yarn vue test tabs --watch`: run all jest tests in interactive mode filtered by `tabs`
114
-
-`yarn vue build`: build the final artefacts
115
-
-`yarn vue lint`: validate and fix the vue codebase using prettier
116
-
-`yarn vue watch`: start a watcher for the vue esm build
117
-
-**Note**: this will be executed for you when using the `yarn vue playground`
106
+
-`npm run react playground`: (alias) start a development server in the `playground-react` package
107
+
-**Note**: this will also run `npm run react watch` for you, which means that you only need to execute `npm run react playground`
108
+
-`npm run react clean`: this will remove `dist` files
109
+
-`npm run vue`: Prefix to run anything in the `@headlessui/vue` package
110
+
-`npm run vue test`: run all jest tests
111
+
-`npm run vue test --watch`: run all jest tests in interactive mode
112
+
-`npm run vue test tabs`: run all jest tests filtered by `tabs`
113
+
-`npm run vue test tabs --watch`: run all jest tests in interactive mode filtered by `tabs`
114
+
-`npm run vue build`: build the final artefacts
115
+
-`npm run vue lint`: validate and fix the vue codebase using prettier
116
+
-`npm run vue watch`: start a watcher for the vue esm build
117
+
-**Note**: this will be executed for you when using the `npm run vue playground`
118
118
-**Note**: this is not required for jest. You will probably never need this
119
-
-`yarn vue playground`: (alias) start a development server in the `playground-vue` package
120
-
-**Note**: this will also run `yarn vue watch` for you, which means that you only need to execute `yarn react playground`
121
-
-`yarn vue clean`: this will remove `dist` files
119
+
-`npm run vue playground`: (alias) start a development server in the `playground-vue` package
120
+
-**Note**: this will also run `npm run vue watch` for you, which means that you only need to execute `npm run react playground`
121
+
-`npm run vue clean`: this will remove `dist` files
0 commit comments