Skip to content

Commit 12f3203

Browse files
committed
build: full turbo setup
1 parent 5254f3a commit 12f3203

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1137
-860
lines changed

package.json

+13-28
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,11 @@
1515
]
1616
},
1717
"scripts": {
18-
"build:module": "esr scripts/build.ts",
19-
"build:prod": "NODE_ENV=production yarn build:module",
20-
"dev": "yarn build:module --dev",
21-
"watch": "yarn build:module --dev --watch",
22-
"prepare": "husky install",
23-
"clean": "esr scripts/generate-typings.ts",
24-
"build:types": "ultra -r --silent --concurrency 20 --filter \"@zag-js/*\" \"tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false\"",
25-
"prebuild": "yarn build:types",
26-
"build": "NODE_ENV=production yarn build:module",
18+
"build:fast": "yarn turbo run build:fast --filter=./packages/**/*",
19+
"build": "turbo run build --filter=./packages/**/*",
20+
"start": "turbo run start --stream --parallel --filter=./packages/**/*",
21+
"postinstall": "husky install && patch-package",
22+
"clean": "manypkg exec rm -rf dist .turbo .swc",
2723
"start:react": "cd examples/next-ts && yarn dev",
2824
"start:vue": "cd examples/vue-ts && vite --port 3002 --clearScreen false",
2925
"start:solid": "cd examples/solid-ts && vite --port 3001 --clearScreen false",
@@ -33,34 +29,30 @@
3329
"cypress:run": "cypress run",
3430
"cypress:dev": "cypress open",
3531
"fix:pkgs": "manypkg fix",
36-
"gen:machine": "esr scripts/generate-machine.ts",
37-
"gen:util": "esr scripts/generate-util.ts",
38-
"lint": "eslint packages --ext .ts",
39-
"postinstall": "patch-package",
32+
"gen:machine": "plop machine",
33+
"gen:util": "plop utility",
34+
"lint": "turbo run lint --stream --parallel",
35+
"version": "changeset version",
4036
"release": "changeset publish",
41-
"test": "jest --maxWorkers=50%",
42-
"test:ci": "jest --runInBand"
37+
"test": "turbo run test --stream",
38+
"test:ci": "turbo run test:ci --stream"
4339
},
4440
"devDependencies": {
4541
"@changesets/changelog-github": "^0.4.0",
4642
"@changesets/cli": "^2.19.0",
4743
"@commitlint/cli": "^16.0.2",
4844
"@commitlint/config-conventional": "^16.0.0",
49-
"@lerna/package-graph": "^4.0.0",
5045
"@manypkg/cli": "^0.17.0",
5146
"@swc-node/jest": "^1.4.3",
5247
"@testing-library/cypress": "^8.0.2",
5348
"@testing-library/dom": "^8.12.0",
5449
"@testing-library/jest-dom": "^5.16.1",
5550
"@types/form-serialize": "^0.7.2",
5651
"@types/jest": "^27.4.0",
57-
"@types/lodash": "^4.14.178",
58-
"@types/shelljs": "^0.8.11",
5952
"@typescript-eslint/eslint-plugin": "^5.9.1",
6053
"@typescript-eslint/parser": "^5.9.1",
6154
"axe-core": "^4.3.5",
6255
"chalk": "^4.1.2",
63-
"chokidar": "^3.5.2",
6456
"commitlint": "^12.1.4",
6557
"cypress": "^8.5.0",
6658
"cypress-axe": "^0.14.0",
@@ -77,23 +69,16 @@
7769
"eslint-plugin-prettier": "^3.4.0",
7870
"eslint-plugin-testing-library": "^4.4.0",
7971
"form-serialize": "^0.7.2",
80-
"gzip-size": "6.0.0",
8172
"husky": "^6.0.0",
8273
"jest": "^26.6.3",
8374
"jest-watch-typeahead": "^0.6.3",
8475
"lint-staged": "^11.0.0",
85-
"lodash": "^4.17.21",
86-
"node-plop": "^0.26.2",
76+
"plop": "^3.0.5",
8777
"patch-package": "^6.4.7",
8878
"prettier": "^2.5.1",
89-
"pretty-bytes": "^5.6.0",
90-
"rimraf": "^3.0.2",
91-
"shelljs": "^0.8.5",
9279
"start-server-and-test": "^1.14.0",
9380
"typescript": "^4.6.3",
94-
"turbo": "^1.2.2",
95-
"lask": "^0.1.0",
96-
"ultra-runner": "^3.10.5"
81+
"turbo": "^1.2.2"
9782
},
9883
"lint-staged": {
9984
"**/*.{ts,tsx,js,jsx}": "prettier --write"

packages/core/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222
"dist/**/*"
2323
],
2424
"scripts": {
25+
"build:fast": "yarn zag build",
2526
"start": "yarn zag build --watch",
2627
"build": "yarn zag build --prod",
27-
"test": "jest --config ../../jest.config.js --rootDir tests",
28+
"test": "jest --config ../../jest.config.js --rootDir tests --passWithNoTests",
2829
"lint": "eslint src --ext .ts,.tsx",
29-
"test:ci": "yarn test --ci --runInBand --updateSnapshot",
30-
"test:watch": "yarn test --watchAll"
30+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
31+
"test:watch": "yarn test --watch --updateSnapshot"
3132
},
3233
"publishConfig": {
3334
"access": "public"
@@ -40,4 +41,4 @@
4041
"klona": "^2.0.5",
4142
"valtio": "^1.5.2"
4243
}
43-
}
44+
}

packages/frameworks/react/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/frameworks/react",
2020
"sideEffects": false,
2121
"files": [
22-
"dist"
22+
"dist/**/*"
2323
],
2424
"publishConfig": {
2525
"access": "public"
@@ -37,5 +37,14 @@
3737
},
3838
"peerDependencies": {
3939
"react": ">=16.8.6"
40+
},
41+
"scripts": {
42+
"build:fast": "yarn zag build",
43+
"start": "yarn zag build --watch",
44+
"build": "yarn zag build --prod",
45+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
46+
"lint": "eslint src --ext .ts,.tsx",
47+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
48+
"test:watch": "yarn test --watch --updateSnapshot"
4049
}
41-
}
50+
}

packages/frameworks/solid/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/frameworks/solid",
2020
"sideEffects": false,
2121
"files": [
22-
"dist"
22+
"dist/**/*"
2323
],
2424
"publishConfig": {
2525
"access": "public"
@@ -37,5 +37,14 @@
3737
},
3838
"peerDependencies": {
3939
"solid-js": ">=1.1.3"
40+
},
41+
"scripts": {
42+
"build:fast": "yarn zag build",
43+
"start": "yarn zag build --watch",
44+
"build": "yarn zag build --prod",
45+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
46+
"lint": "eslint src --ext .ts,.tsx",
47+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
48+
"test:watch": "yarn test --watch --updateSnapshot"
4049
}
41-
}
50+
}

packages/frameworks/svelte/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/core/svelte",
2020
"sideEffects": false,
2121
"files": [
22-
"dist"
22+
"dist/**/*"
2323
],
2424
"publishConfig": {
2525
"access": "public"
@@ -35,5 +35,14 @@
3535
},
3636
"peerDependencies": {
3737
"svelte": "^3.38.2"
38+
},
39+
"scripts": {
40+
"build:fast": "yarn zag build",
41+
"start": "yarn zag build --watch",
42+
"build": "yarn zag build --prod",
43+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
44+
"lint": "eslint src --ext .ts,.tsx",
45+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
46+
"test:watch": "yarn test --watch --updateSnapshot"
3847
}
39-
}
48+
}

packages/frameworks/vue/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/frameworks/vue",
2020
"sideEffects": false,
2121
"files": [
22-
"dist"
22+
"dist/**/*"
2323
],
2424
"publishConfig": {
2525
"access": "public"
@@ -38,5 +38,14 @@
3838
"peerDependencies": {
3939
"@vue/runtime-dom": ">=3.2.0",
4040
"vue": ">=3.0.0"
41+
},
42+
"scripts": {
43+
"build:fast": "yarn zag build",
44+
"start": "yarn zag build --watch",
45+
"build": "yarn zag build --prod",
46+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
47+
"lint": "eslint src --ext .ts,.tsx",
48+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
49+
"test:watch": "yarn test --watch --updateSnapshot"
4150
}
42-
}
51+
}

packages/machines/accordion/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/accordion",
2121
"sideEffects": false,
2222
"files": [
23-
"dist"
23+
"dist/**/*"
2424
],
2525
"publishConfig": {
2626
"access": "public"
@@ -33,5 +33,14 @@
3333
"@zag-js/dom-utils": "^0.0.0",
3434
"@zag-js/types": "^0.0.0",
3535
"@zag-js/utils": "^0.0.0"
36+
},
37+
"scripts": {
38+
"build:fast": "yarn zag build",
39+
"start": "yarn zag build --watch",
40+
"build": "yarn zag build --prod",
41+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
42+
"lint": "eslint src --ext .ts,.tsx",
43+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
44+
"test:watch": "yarn test --watch --updateSnapshot"
3645
}
37-
}
46+
}

packages/machines/combobox/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/combobox",
2121
"sideEffects": false,
2222
"files": [
23-
"dist"
23+
"dist/**/*"
2424
],
2525
"publishConfig": {
2626
"access": "public"
@@ -34,5 +34,14 @@
3434
"@zag-js/dom-utils": "^0.0.0",
3535
"@zag-js/types": "^0.0.0",
3636
"scroll-into-view-if-needed": "^2.2.28"
37+
},
38+
"scripts": {
39+
"build:fast": "yarn zag build",
40+
"start": "yarn zag build --watch",
41+
"build": "yarn zag build --prod",
42+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
43+
"lint": "eslint src --ext .ts,.tsx",
44+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
45+
"test:watch": "yarn test --watch --updateSnapshot"
3746
}
38-
}
47+
}

packages/machines/dialog/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/dialog",
2121
"sideEffects": false,
2222
"files": [
23-
"dist"
23+
"dist/**/*"
2424
],
2525
"publishConfig": {
2626
"access": "public"
@@ -35,5 +35,14 @@
3535
"aria-hidden": "^1.1.3",
3636
"focus-trap": "^6.7.1",
3737
"scroll-into-view-if-needed": "^2.2.28"
38+
},
39+
"scripts": {
40+
"build:fast": "yarn zag build",
41+
"start": "yarn zag build --watch",
42+
"build": "yarn zag build --prod",
43+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
44+
"lint": "eslint src --ext .ts,.tsx",
45+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
46+
"test:watch": "yarn test --watch --updateSnapshot"
3847
}
39-
}
48+
}

packages/machines/editable/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/editable",
2121
"sideEffects": false,
2222
"files": [
23-
"dist"
23+
"dist/**/*"
2424
],
2525
"publishConfig": {
2626
"access": "public"
@@ -32,5 +32,14 @@
3232
"@zag-js/core": "^0.0.0",
3333
"@zag-js/dom-utils": "^0.0.0",
3434
"@zag-js/types": "^0.0.0"
35+
},
36+
"scripts": {
37+
"build:fast": "yarn zag build",
38+
"start": "yarn zag build --watch",
39+
"build": "yarn zag build --prod",
40+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
41+
"lint": "eslint src --ext .ts,.tsx",
42+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
43+
"test:watch": "yarn test --watch --updateSnapshot"
3544
}
36-
}
45+
}

packages/machines/menu/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/menu",
2121
"sideEffects": false,
2222
"files": [
23-
"dist"
23+
"dist/**/*"
2424
],
2525
"publishConfig": {
2626
"access": "public"
@@ -35,5 +35,14 @@
3535
"@zag-js/popper": "^0.0.0",
3636
"@zag-js/types": "^0.0.0",
3737
"@zag-js/utils": "^0.0.0"
38+
},
39+
"scripts": {
40+
"build:fast": "yarn zag build",
41+
"start": "yarn zag build --watch",
42+
"build": "yarn zag build --prod",
43+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
44+
"lint": "eslint src --ext .ts,.tsx",
45+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
46+
"test:watch": "yarn test --watch --updateSnapshot"
3847
}
39-
}
48+
}

packages/machines/number-input/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/number-input",
2121
"sideEffects": false,
2222
"files": [
23-
"dist"
23+
"dist/**/*"
2424
],
2525
"publishConfig": {
2626
"access": "public"
@@ -35,5 +35,14 @@
3535
"@zag-js/rect-utils": "^0.0.0",
3636
"@zag-js/types": "^0.0.0",
3737
"@zag-js/utils": "^0.0.0"
38+
},
39+
"scripts": {
40+
"build:fast": "yarn zag build",
41+
"start": "yarn zag build --watch",
42+
"build": "yarn zag build --prod",
43+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
44+
"lint": "eslint src --ext .ts,.tsx",
45+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
46+
"test:watch": "yarn test --watch --updateSnapshot"
3847
}
39-
}
48+
}

packages/machines/pin-input/package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/pin-input",
2121
"sideEffects": false,
2222
"files": [
23-
"dist"
23+
"dist/**/*"
2424
],
2525
"publishConfig": {
2626
"access": "public"
@@ -33,5 +33,14 @@
3333
"@zag-js/dom-utils": "^0.0.0",
3434
"@zag-js/types": "^0.0.0",
3535
"@zag-js/utils": "^0.0.0"
36+
},
37+
"scripts": {
38+
"build:fast": "yarn zag build",
39+
"start": "yarn zag build --watch",
40+
"build": "yarn zag build --prod",
41+
"test": "jest --config ../../../jest.config.js --rootDir tests --passWithNoTests",
42+
"lint": "eslint src --ext .ts,.tsx",
43+
"test:ci": "yarn test --ci --runInBand --maxWorkers=50%",
44+
"test:watch": "yarn test --watch --updateSnapshot"
3645
}
37-
}
46+
}

0 commit comments

Comments
 (0)