Skip to content

Commit

Permalink
build: tsup and esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
denkristoffer committed Sep 6, 2022
1 parent e583504 commit c67f143
Show file tree
Hide file tree
Showing 52 changed files with 620 additions and 1,210 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ esm
*.css.d.ts
public
.cache
tsup.config.ts

# next.js
**/.next/
**/out/
**/out/
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
**/.rts2_cache_esm
**/.rts2_cache_umd
**/.rts2_cache_system
**/.parcel-cache

# editors
.vscode/
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ node_modules
dist
dist-storybook
build
.parcel-cache
public
.cache
.next
Expand Down
18 changes: 3 additions & 15 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,13 @@ module.exports = [
{
ignore: ['react', 'react-dom'],
limit: '3.2 s',
name: 'f36-components',
path: 'packages/forma-36-react-components/dist/f36-components.js',
},
{
ignore: ['react', 'react-dom'],
limit: '3.2 s',
name: 'Modern',
path: 'packages/forma-36-react-components/dist/f36-components.modern.js',
name: 'CommonJS',
path: 'packages/forma-36-react-components/dist/index.js',
},
{
ignore: ['react', 'react-dom'],
limit: '3.2 s',
name: 'Module',
path: 'packages/forma-36-react-components/dist/f36-components.module.js',
},
{
ignore: ['react', 'react-dom'],
limit: '3.2 s',
name: 'UMD',
path: 'packages/forma-36-react-components/dist/f36-components.umd.js',
path: 'packages/forma-36-react-components/dist/index.mjs',
},
];
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = (api) => {
},
},
],
'@parcel/babel-preset-env',
'@babel/preset-env',
['@babel/preset-typescript', { allExtensions: true, isTSX: true }],
],
plugins: [emotionPlugin],
Expand Down
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"commit": "git-cz",
"commitmsg": "validate-commit-msg",
"generate": "plop --plopfile scripts/plopfile.js",
"postinstall": "rm -rf .parcel-cache && turbo run build --scope=@contentful/f36-tokens --no-deps",
"postinstall": "turbo run build --scope=@contentful/f36-tokens --no-deps",
"lint": "yarn run lint:js && yarn run lint:packages",
"lint:js": "eslint packages --ext .js,.jsx,.ts,.tsx",
"lint:packages": "node scripts/lint-packages.js",
Expand Down Expand Up @@ -71,10 +71,6 @@
"@contentful/browserslist-config": "^2.0.0",
"@manypkg/get-packages": "^1.1.3",
"@netlify/plugin-nextjs": "^4.0.0-rc.1",
"@parcel/babel-plugin-transform-runtime": "2.6.2",
"@parcel/babel-preset-env": "2.6.2",
"@parcel/packager-ts": "2.6.2",
"@parcel/transformer-typescript-types": "2.6.2",
"@size-limit/preset-big-lib": "^8.0.1",
"@storybook/addon-a11y": "^6.5.10",
"@storybook/addon-essentials": "^6.5.10",
Expand Down Expand Up @@ -129,9 +125,7 @@
"jest-axe": "6.0.0",
"jest-emotion": "^10.0.27",
"jest-watch-typeahead": "0.6.1",
"microbundle": "^0.14.1",
"octokit": "^1.7.1",
"parcel": "2.6.2",
"plop": "^2.5.3",
"postcss": "^8.4.12",
"postcss-copy-assets": "^0.3.1",
Expand All @@ -150,6 +144,7 @@
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"size-limit": "^8.0.1",
"tsup": "^6.2.3",
"turbo": "^1.0.6",
"typescript": "4.7.3",
"webpack": "5"
Expand Down
8 changes: 4 additions & 4 deletions packages/components/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand All @@ -17,7 +17,7 @@
"url": "https://github.com/contentful/forma-36"
},
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/asset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.17.0",
"description": "Forma 36: Asset component",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -21,9 +21,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/autocomplete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.17.0",
"description": "Forma 36: Autocomplete component",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -26,9 +26,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand All @@ -17,7 +17,7 @@
"url": "https://github.com/contentful/forma-36"
},
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.17.0",
"description": "Forma 36: Button component",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -23,9 +23,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.17.0",
"description": "Forma 36: Card components",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -29,9 +29,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/collapse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand All @@ -17,7 +17,7 @@
"url": "https://github.com/contentful/forma-36"
},
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/copybutton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.17.0",
"description": "Forma 36: CopyButton component",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -21,9 +21,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/datepicker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.1.0-beta.8",
"description": "Forma 36: Datepicker component",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -26,9 +26,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/datetime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.17.0",
"description": "Forma 36: DateTime component",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -19,9 +19,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/drag-handle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.17.0",
"description": "Forma 36: DragHandle component",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -19,9 +19,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/entity-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.17.0",
"description": "Forma 36: EntityList component",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -26,9 +26,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
8 changes: 4 additions & 4 deletions packages/components/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.17.0",
"description": "Forma 36: Form React Components",
"scripts": {
"build": "parcel build"
"build": "tsup"
},
"dependencies": {
"@babel/runtime": "^7.6.2",
Expand All @@ -20,9 +20,9 @@
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"sideEffects": false,
"browserslist": "extends @contentful/browserslist-config",
Expand Down
Loading

0 comments on commit c67f143

Please sign in to comment.