Skip to content

Commit

Permalink
chore: improve build script and time
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Nov 21, 2021
1 parent e61d56f commit de40a73
Show file tree
Hide file tree
Showing 44 changed files with 4,799 additions and 2,339 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,5 @@ temp/
# End of https://www.toptal.com/developers/gitignore/api/node,yarn,jetbrains,visualstudiocode

# System files
.DS_Store
.DS_Store
.ultra.cache.json
4 changes: 0 additions & 4 deletions examples/next-ts/.babelrc

This file was deleted.

2 changes: 0 additions & 2 deletions examples/next-ts/next.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions examples/next-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "with-typescript",
"name": "next-ts",
"version": "0.0.0",
"private": true,
"scripts": {
Expand All @@ -22,13 +22,11 @@
"react-spinners": "^0.11.0"
},
"devDependencies": {
"@preconstruct/next": "^3.0.0",
"@types/node": "16.9.1",
"@types/react": "^17.0.20",
"@types/react-dom": "^17.0.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"regenerator-runtime": "^0.13.9",
"typescript": "4.4.3"
},
"license": "MIT"
Expand Down
6 changes: 1 addition & 5 deletions examples/next-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
"skipLibCheck": true,
"strict": false,
"target": "esnext",
"baseUrl": ".",
"paths": {
"@ui-machines/core": ["../../packages/core/src"],
"@ui-machines/react": ["../../packages/frameworks/react/src"]
}
"baseUrl": "."
},
"exclude": ["node_modules"],
"include": ["**/*.ts", "**/*.tsx", "next-env.d.ts"]
Expand Down
1 change: 1 addition & 0 deletions examples/solid-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "solid-ts",
"version": "0.0.0",
"description": "",
"private": true,
"scripts": {
"clean": "echo 'clean'",
"dev": "vite",
Expand Down
20 changes: 2 additions & 18 deletions examples/vue-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "with-typescript-on-vue",
"name": "vue-ts",
"version": "0.0.0",
"private": true,
"scripts": {
Expand Down Expand Up @@ -34,26 +34,10 @@
"optimizeDeps": {
"include": [
"@emotion/css",
"@vue/runtime-core",
"aria-hidden",
"focus-trap",
"klona",
"merge-anything",
"react",
"scroll-into-view-if-needed",
"tiny-array",
"tiny-dom-event",
"tiny-dom-query",
"tiny-dom-query/focusable",
"tiny-dom-query/scrollable",
"tiny-dom-query/tabbable",
"tiny-fn",
"tiny-nodelist",
"@ui-machines/point-utils/distance",
"@ui-machines/rect-utils",
"@ui-machines/point-utils/within",
"@ui-machines/rect-utils",
"@ui-machines/rect-utils/from-element",
"@ui-machines/rect-utils/operations",
"valtio",
"valtio/utils",
"valtio/vanilla",
Expand Down
2 changes: 1 addition & 1 deletion examples/vue-ts/src/pages/accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { accordion } from "@ui-machines/web"
import { accordion } from "@ui-machines/accordion"
import { useMachine, normalizeProps, VuePropTypes } from "@ui-machines/vue"
import { defineComponent, h, Fragment, computed, watch } from "vue"
import { StateVisualizer } from "../components/state-visualizer"
Expand Down
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
"author": "Segun Adebayo <[email protected]>",
"license": "MIT",
"scripts": {
"bundle": "esr scripts/build.ts",
"build": "parcel build",
"buildr": "esr scripts/build.ts",
"dev": "yarn buildr --dev",
"watch": "yarn buildr --dev --watch",
"build:bundle": "yarn buildr",
"build:types": "ultra -r --silent --filter \"@ui-machines/*\" --build",
"build": "yarn build:types && yarn build:bundle",
"start:react": "cd examples/next-ts && yarn dev",
"start:vue": "cd examples/vue-ts && yarn dev",
"start:solid": "cd examples/solid-ts && yarn dev",
Expand All @@ -19,19 +23,16 @@
"cypress:run": "cypress run",
"cypress:dev": "cypress open",
"fix:pkgs": "manypkg fix",
"fix:preconstruct": "preconstruct fix",
"gen:machine": "ts-node scripts/generate-machine.ts",
"gen:util": "ts-node scripts/generate-util.ts",
"lint": "npm-run-all lint:**",
"lint:code": "eslint . --ext .js,.jsx,.ts,.tsx -c .eslintrc",
"lint:pkgs": "manypkg check",
"lint:types": "tsc --noEmit --incremental",
"lint:validate": "preconstruct validate",
"pkg": "manypkg run",
"postinstall": "patch-package",
"prepare:": "husky install",
"release": "changeset publish",
"start": "preconstruct watch",
"test": "jest --maxWorkers=50%",
"test:ci": "jest --runInBand"
},
Expand Down Expand Up @@ -60,11 +61,13 @@
"@typescript-eslint/parser": "^4.23.0",
"axe-core": "^4.3.3",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
"commitlint": "^12.1.4",
"cypress": "^8.5.0",
"cypress-axe": "^0.13.0",
"cypress-plugin-tab": "^1.0.5",
"cypress-real-events": "^1.5.1",
"dts-bundle-generator": "^6.0.0",
"esbuild": "^0.13.14",
"esbuild-runner": "^2.2.1",
"eslint": "^7.26.0",
Expand All @@ -84,14 +87,16 @@
"lint-staged": "^11.0.0",
"lodash": "^4.17.21",
"node-plop": "^0.26.2",
"npm-dts": "^1.3.10",
"npm-run-all": "^4.1.5",
"patch-package": "^6.4.7",
"prettier": "^2.3.0",
"pretty-bytes": "^5.6.0",
"rimraf": "^3.0.2",
"shelljs": "^0.8.4",
"start-server-and-test": "^1.14.0",
"typescript": "4.4.3"
"typescript": "4.4.3",
"ultra-runner": "^3.10.5"
},
"workspaces": {
"packages": [
Expand Down
9 changes: 7 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"repository": "https://github.com/chakra-ui/core/tree/main/packages/machine",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -29,5 +28,11 @@
"dependencies": {
"valtio": "^1.2.5",
"klona": "^2.0.4"
},
"devDependencies": {
"@ui-machines/utils": "^0.0.0"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
6 changes: 4 additions & 2 deletions packages/frameworks/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/frameworks/react",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -36,5 +35,8 @@
},
"peerDependencies": {
"react": ">=16.8.6"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
6 changes: 4 additions & 2 deletions packages/frameworks/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/frameworks/solid",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -36,5 +35,8 @@
},
"peerDependencies": {
"solid-js": ">=1.1.3"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
6 changes: 4 additions & 2 deletions packages/frameworks/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/core/svelte",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -34,5 +33,8 @@
},
"peerDependencies": {
"svelte": "^3.38.2"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
6 changes: 4 additions & 2 deletions packages/frameworks/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/frameworks/vue",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -36,5 +35,8 @@
"peerDependencies": {
"vue": ">=3.0.0",
"@vue/runtime-dom": ">=3.2.0"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
11 changes: 9 additions & 2 deletions packages/machines/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/accordion",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -31,5 +30,13 @@
},
"dependencies": {
"@ui-machines/core": "^0.0.0"
},
"devDependencies": {
"@ui-machines/utils": "^0.0.0",
"@ui-machines/dom-utils": "^0.0.0",
"@ui-machines/types": "^0.0.0"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
11 changes: 9 additions & 2 deletions packages/machines/combobox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/combobox",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -32,5 +31,13 @@
"dependencies": {
"@ui-machines/core": "^0.0.0",
"scroll-into-view-if-needed": "^2.2.28"
},
"devDependencies": {
"@ui-machines/utils": "^0.0.0",
"@ui-machines/dom-utils": "^0.0.0",
"@ui-machines/types": "^0.0.0"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
11 changes: 9 additions & 2 deletions packages/machines/dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/dialog",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -34,5 +33,13 @@
"aria-hidden": "^1.1.3",
"focus-trap": "^6.7.1",
"scroll-into-view-if-needed": "^2.2.28"
},
"devDependencies": {
"@ui-machines/utils": "^0.0.0",
"@ui-machines/dom-utils": "^0.0.0",
"@ui-machines/types": "^0.0.0"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
10 changes: 8 additions & 2 deletions packages/machines/editable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/editable",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -31,5 +30,12 @@
},
"dependencies": {
"@ui-machines/core": "^0.0.0"
},
"devDependencies": {
"@ui-machines/dom-utils": "^0.0.0",
"@ui-machines/types": "^0.0.0"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
12 changes: 10 additions & 2 deletions packages/machines/menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/menu",
"sideEffects": false,
"files": [
"dist",
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -31,5 +30,14 @@
},
"dependencies": {
"@ui-machines/core": "^0.0.0"
},
"devDependencies": {
"@ui-machines/utils": "^0.0.0",
"@ui-machines/dom-utils": "^0.0.0",
"@ui-machines/rect-utils": "^0.0.0",
"@ui-machines/types": "^0.0.0"
},
"scripts": {
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false"
}
}
Loading

0 comments on commit de40a73

Please sign in to comment.