Skip to content

Commit

Permalink
feat: setup tsup
Browse files Browse the repository at this point in the history
  • Loading branch information
mleralec committed Sep 14, 2023
1 parent 47d9c94 commit 79c1b21
Show file tree
Hide file tree
Showing 71 changed files with 536 additions and 268 deletions.
8 changes: 4 additions & 4 deletions icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "node ../scripts/build.js",
"types": "mkdir -p dist/types && cp src/index.d.ts dist/types/index.d.ts"
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
"types": "mkdir -p dist && cp src/index.d.ts dist/index.d.ts"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"build:core": "./scripts/core.sh",
"build:docs": "lerna run doc --concurrency 2",
"build:packages": "lerna run build --ignore docs --ignore @welcome-ui/core",
"build:types": "lerna run types",
"build": "yarn webfont:build && yarn build:core && yarn build:packages && yarn build:types && yarn build:docs",
"build": "yarn webfont:build && yarn build:core && yarn build:packages && yarn build:docs",
"check:audit": "/bin/bash -c 'yarn audit --level critical; [[ $? -ge 16 ]] && exit 1 || exit 0'",
"check:ssh-error": "tput setaf 1; echo 'Warning ! Your ssh key is not correctly set ( or forwarded if you work on a remote machine )'; tput sgr0",
"check:ssh": "ssh-add -L >> /dev/null",
Expand Down Expand Up @@ -84,6 +83,7 @@
"@babel/preset-typescript": "^7.22.11",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@swc/core": "^1.3.84",
"@testing-library/dom": "9.3.1",
"@testing-library/jest-dom": "^6.1.2",
"@testing-library/react": "^14.0.0",
Expand Down Expand Up @@ -132,6 +132,7 @@
"standard-version": "9.5.0",
"styled-components": "^5.3.9",
"svgo": "^3.0.1",
"tsup": "^7.2.0",
"typescript": "5.0.2",
"wttj-config": "^2.6.2",
"yargs": "^17.7.2"
Expand Down
7 changes: 3 additions & 4 deletions packages/Accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name Accordion"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/Alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name Alert"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/AspectRatio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name AspectRatio"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/Avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name Avatar"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/Badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name Badge"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/Box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name Box"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/Breadcrumb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name Breadcrumb"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/Button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "welcome-ui: A button component",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
Expand All @@ -16,9 +16,8 @@
},
"component": "Button",
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name Button"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/ButtonGroup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "welcome-ui: A ButtonGroup component",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name ButtonGroup"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/Card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name Card"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/Checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name Checkbox"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/ClearButton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name ClearButton"
},
"publishConfig": {
Expand Down
7 changes: 3 additions & 4 deletions packages/CloseButton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json",
"./dist/index.doc.json": "./dist/index.doc.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"doc": "node -r esm ../../scripts/doc-props.js --name CloseButton"
},
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/Copy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "node ../../scripts/build.js",
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
"test": "jest",
"types": "rimraf dist/types && tsc --emitDeclarationOnly --declaration --declarationDir dist/types"
},
Expand Down
Loading

0 comments on commit 79c1b21

Please sign in to comment.