Skip to content

Commit

Permalink
Switch to Preconstruct
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed May 29, 2023
1 parent 71e5c07 commit 0b3559b
Show file tree
Hide file tree
Showing 8 changed files with 1,651 additions and 548 deletions.
9 changes: 9 additions & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{js,mjs,jsx,cjs,ts,tsx}": [
"@parcel/transformer-js",
"@parcel/transformer-react-refresh-wrap"
]
}
}
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@babel/preset-typescript")],
};
28 changes: 21 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
{
"name": "suspense-repo",
"private": true,
"scripts": {
"clear": "npm run clear:parcel-cache & npm run clear:builds & npm run clear:node_modules",
"clear:builds": "rm -rf ./packages/*/dist",
"clear:parcel-cache": "rm -rf ./.parcel-cache",
"clear:node_modules": "rm -rf ./node_modules && rm -rf ./packages/*/node_modules",
"docs": "cd packages/suspense-website && pnpm build",
"prerelease": "rm -rf ./.parcel-cache && pnpm -r run build",
"prerelease": "preconstruct build",
"prettier": "prettier --write \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
"test": "pnpm -r run test",
"typescript": "tsc --noEmit",
"typescript:watch": "tsc --noEmit --watch"
},
"devDependencies": {
"@parcel/core": "^2.8.3",
"@parcel/packager-ts": "^2.8.3",
"@parcel/transformer-inline-string": "^2.8.3",
"@parcel/transformer-typescript-types": "^2.8.3",
"@babel/preset-typescript": "^7.21.5",
"@parcel/config-default": "^2.9.1",
"@parcel/core": "^2.9.1",
"@parcel/transformer-js": "^2.9.1",
"@parcel/transformer-react-refresh-wrap": "^2.9.1",
"@preconstruct/cli": "^2.7.0",
"@types/jest": "^29.4.0",
"@types/node": "^18.14.6",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"@types/react-virtualized-auto-sizer": "^1.0.1",
"parcel": "^2.8.3",
"parcel": "^2.9.1",
"path-browserify": "^1.0.0",
"prettier": "latest",
"process": "^0.11.10",
Expand All @@ -35,5 +38,16 @@
"packages/interval-utilities",
"packages/suspense",
"packages/suspense-website"
]
],
"preconstruct": {
"packages": [
"packages/!(suspense-website)"
],
"exports": {
"importConditionDefaultExport": "default"
},
"___experimentalFlags_WILL_CHANGE_IN_PATCH": {
"importsConditions": true
}
}
}
18 changes: 15 additions & 3 deletions packages/array-sorting-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
"url": "git+https://github.com/bvaughn/suspense.git"
},
"source": "src/index.ts",
"main": "dist/array-sorting-utilities.js",
"module": "dist/array-sorting-utilities.module.js",
"types": "dist/array-sorting-utilities.d.ts",
"main": "dist/array-sorting-utilities.cjs.js",
"module": "dist/array-sorting-utilities.esm.js",
"exports": {
".": {
"types": {
"import": "./dist/array-sorting-utilities.cjs.mjs",
"default": "./dist/array-sorting-utilities.cjs.js"
},
"module": "./dist/array-sorting-utilities.esm.js",
"import": "./dist/array-sorting-utilities.cjs.mjs",
"default": "./dist/array-sorting-utilities.cjs.js"
},
"./package.json": "./package.json"
},
"types": "dist/array-sorting-utilities.cjs.d.ts",
"scripts": {
"build": "parcel build",
"test": "jest",
Expand Down
18 changes: 15 additions & 3 deletions packages/interval-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
"url": "git+https://github.com/bvaughn/suspense.git"
},
"source": "src/index.ts",
"main": "dist/interval-utilities.js",
"module": "dist/interval-utilities.module.js",
"types": "dist/interval-utilities.d.ts",
"main": "dist/interval-utilities.cjs.js",
"module": "dist/interval-utilities.esm.js",
"exports": {
".": {
"types": {
"import": "./dist/interval-utilities.cjs.mjs",
"default": "./dist/interval-utilities.cjs.js"
},
"module": "./dist/interval-utilities.esm.js",
"import": "./dist/interval-utilities.cjs.mjs",
"default": "./dist/interval-utilities.cjs.js"
},
"./package.json": "./package.json"
},
"types": "dist/interval-utilities.cjs.d.ts",
"scripts": {
"build": "parcel build",
"test": "jest",
Expand Down
18 changes: 15 additions & 3 deletions packages/point-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
"url": "git+https://github.com/bvaughn/suspense.git"
},
"source": "src/index.ts",
"main": "dist/point-utilities.js",
"module": "dist/point-utilities.module.js",
"types": "dist/point-utilities.d.ts",
"main": "dist/point-utilities.cjs.js",
"module": "dist/point-utilities.esm.js",
"exports": {
".": {
"types": {
"import": "./dist/point-utilities.cjs.mjs",
"default": "./dist/point-utilities.cjs.js"
},
"module": "./dist/point-utilities.esm.js",
"import": "./dist/point-utilities.cjs.mjs",
"default": "./dist/point-utilities.cjs.js"
},
"./package.json": "./package.json"
},
"types": "dist/point-utilities.cjs.d.ts",
"scripts": {
"build": "parcel build",
"test": "jest",
Expand Down
18 changes: 15 additions & 3 deletions packages/suspense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
"url": "git+https://github.com/bvaughn/suspense.git"
},
"source": "src/index.ts",
"main": "dist/suspense.js",
"module": "dist/suspense.module.js",
"types": "dist/suspense.d.ts",
"main": "dist/suspense.cjs.js",
"module": "dist/suspense.esm.js",
"exports": {
".": {
"types": {
"import": "./dist/suspense.cjs.mjs",
"default": "./dist/suspense.cjs.js"
},
"module": "./dist/suspense.esm.js",
"import": "./dist/suspense.cjs.mjs",
"default": "./dist/suspense.cjs.js"
},
"./package.json": "./package.json"
},
"types": "dist/suspense.cjs.d.ts",
"scripts": {
"build": "parcel build",
"test": "pnpm run test:browser & pnpm run test:node",
Expand Down
Loading

0 comments on commit 0b3559b

Please sign in to comment.