diff --git a/.monorepolint.config.mjs b/.monorepolint.config.mjs index 58617304cd..71e2de1a7d 100644 --- a/.monorepolint.config.mjs +++ b/.monorepolint.config.mjs @@ -9,6 +9,8 @@ import { packageEntry, packageScript, requireDependency, + standardTsconfig, + fileContents, } from "@monorepolint/rules"; const TS_PACKAGES = []; // projects that use typescript to build @@ -86,6 +88,35 @@ export default { }), alphabeticalDependencies({ includeWorkspaceRoot: true }), alphabeticalScripts({ includeWorkspaceRoot: true }), + standardTsconfig({ + options: { templateFile: "./templates/package/tsconfig.json" }, + includePackages: [...TS_PACKAGES, MAIN_PACKAGE], + }), + standardTsconfig({ + options: { templateFile: "./templates/package-js/tsconfig.json" }, + includePackages: JS_PACKAGES, + }), + fileContents({ + options: { + file: "tsconfig.build.json", + templateFile: "./templates/package/tsconfig.build.json", + }, + includePackages: [...TS_PACKAGES, ...JS_PACKAGES], + }), + fileContents({ + options: { + file: "tsup.config.ts", + templateFile: "./templates/package/tsup.config.ts", + }, + includePackages: [...TS_PACKAGES, MAIN_PACKAGE], + }), + fileContents({ + options: { + file: "tsup.config.ts", + templateFile: "./templates/package-js/tsup.config.ts", + }, + includePackages: JS_PACKAGES, + }), packageEntry({ options: { entries: { @@ -180,17 +211,16 @@ export default { packageScript({ options: { scripts: { - build: "tsup --config ../../tsup.config.ts", + build: "tsup", }, }, - includePackages: [...TS_PACKAGES, ...JS_PACKAGES], + includePackages: [...TS_PACKAGES, ...JS_PACKAGES, MAIN_PACKAGE], }), packageScript({ options: { scripts: { - build: - "tsup --config ../../tsup.config.ts && rollup -c rollup.config.js", + rollup: "rollup -c rollup.config.js", }, }, includePackages: [MAIN_PACKAGE], @@ -209,13 +239,20 @@ export default { packageScript({ options: { scripts: { - "test:types": - "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts", + "test:types": "tsc --project tsconfig.types.json", }, }, includePackages: TYPES_PACKAGES, }), + fileContents({ + options: { + file: "tsconfig.types.json", + templateFile: "./templates/package/tsconfig.types.json", + }, + includePackages: TYPES_PACKAGES, + }), + requireDependency({ options: { devDependencies: { diff --git a/.prettierignore b/.prettierignore index 75d917b75f..da54fb641c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,4 +10,10 @@ pnpm-lock.yaml /.nx/cache -/.nx/workspace-data \ No newline at end of file +/.nx/workspace-data + +# Auto generated by mrl, which produces a slightly clashing format. +tsconfig.json +tsconfig.build.json +tsconfig.shared.json +tsconfig.types.json diff --git a/nx.json b/nx.json index e6ced2dd5d..8facc83e59 100644 --- a/nx.json +++ b/nx.json @@ -29,7 +29,7 @@ "{projectRoot}/test/**", "{projectRoot}/types.ts" ], - "dependsOn": ["build"], + "dependsOn": [], "cache": true }, "last-checks": { diff --git a/package.json b/package.json index 65f2c75512..b959d22a81 100644 --- a/package.json +++ b/package.json @@ -2,18 +2,24 @@ "private": true, "funding": "https://opencollective.com/turf", "scripts": { + "build": "pnpx lerna run build", "docs": "tsx ./scripts/generate-readmes.ts", + "escheck": "pnpm run /escheck:.*/", + "escheck:cjs": "es-check es8 packages/*/dist/cjs/index.cjs packages/turf/turf.min.js", + "escheck:esm": "es-check --module es8 packages/*/dist/esm/index.js", + "escheck:web": "es-check es5 packages/turf/turf.min.js", "lint": "pnpm run /lint:.*/", "lint:docs": "documentation lint packages/turf-*/index.js", - "lint:escheck-cjs": "es-check es8 packages/*/dist/cjs/index.cjs packages/turf/turf.min.js", - "lint:escheck-esm": "es-check --module es8 packages/*/dist/esm/index.js", - "lint:escheck-web": "es-check es5 packages/turf/turf.min.js", "lint:eslint": "eslint packages", "lint:mrl": "mrl check", "lint:prettier": "prettier --check .", "preinstall": "npx only-allow pnpm", - "prepare": "husky && lerna run build", - "test": "pnpm run lint && lerna run test && lerna run --scope @turf/turf last-checks" + "prepare": "husky", + "prerelease": "pnpm run build && pnpm run rollup", + "release": "pnpm run test:release && pnpm publish -r", + "rollup": "lerna run --scope @turf/turf rollup", + "test": "pnpx lerna run test", + "test:release": "pnpm run lint && pnpm run escheck && lerna run --scope @turf/turf last-checks" }, "lint-staged": { "package.json": [ diff --git a/packages/turf-along/package.json b/packages/turf-along/package.json index 0e8afa0173..06f1b0bf27 100644 --- a/packages/turf-along/package.json +++ b/packages/turf-along/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-along/tsconfig.build.json b/packages/turf-along/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-along/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-along/tsconfig.json b/packages/turf-along/tsconfig.json index 563bf86442..5544ce55fa 100644 --- a/packages/turf-along/tsconfig.json +++ b/packages/turf-along/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bearing" + }, + { + "path": "../turf-destination" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-along/tsup.config.ts b/packages/turf-along/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-along/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-angle/package.json b/packages/turf-angle/package.json index 99aaa2b6da..8a7f8b9070 100644 --- a/packages/turf-angle/package.json +++ b/packages/turf-angle/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-angle/tsconfig.build.json b/packages/turf-angle/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-angle/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-angle/tsconfig.json b/packages/turf-angle/tsconfig.json index 563bf86442..9f2b0990b5 100644 --- a/packages/turf-angle/tsconfig.json +++ b/packages/turf-angle/tsconfig.json @@ -1,3 +1,30 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bearing" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-rhumb-bearing" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-sector" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-angle/tsup.config.ts b/packages/turf-angle/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-angle/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-area/package.json b/packages/turf-area/package.json index 04cbdbd8a3..1d4ada4c10 100644 --- a/packages/turf-area/package.json +++ b/packages/turf-area/package.json @@ -45,7 +45,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-area/tsconfig.build.json b/packages/turf-area/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-area/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-area/tsconfig.json b/packages/turf-area/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-area/tsconfig.json +++ b/packages/turf-area/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-area/tsup.config.ts b/packages/turf-area/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-area/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-bbox-clip/package.json b/packages/turf-bbox-clip/package.json index a48aa82a18..7f0eccd0c5 100644 --- a/packages/turf-bbox-clip/package.json +++ b/packages/turf-bbox-clip/package.json @@ -51,7 +51,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-bbox-clip/tsconfig.build.json b/packages/turf-bbox-clip/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-bbox-clip/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-bbox-clip/tsconfig.json b/packages/turf-bbox-clip/tsconfig.json index 563bf86442..b3c9853090 100644 --- a/packages/turf-bbox-clip/tsconfig.json +++ b/packages/turf-bbox-clip/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-bbox" + } + ] } diff --git a/packages/turf-bbox-clip/tsup.config.ts b/packages/turf-bbox-clip/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-bbox-clip/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-bbox-polygon/package.json b/packages/turf-bbox-polygon/package.json index 89f5dc7176..c7224fe13b 100644 --- a/packages/turf-bbox-polygon/package.json +++ b/packages/turf-bbox-polygon/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-bbox-polygon/tsconfig.build.json b/packages/turf-bbox-polygon/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-bbox-polygon/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-bbox-polygon/tsconfig.json b/packages/turf-bbox-polygon/tsconfig.json index 563bf86442..d777551892 100644 --- a/packages/turf-bbox-polygon/tsconfig.json +++ b/packages/turf-bbox-polygon/tsconfig.json @@ -1,3 +1,12 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-bbox-polygon/tsup.config.ts b/packages/turf-bbox-polygon/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-bbox-polygon/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-bbox/package.json b/packages/turf-bbox/package.json index a3ed459b9a..f18ef4ea9a 100644 --- a/packages/turf-bbox/package.json +++ b/packages/turf-bbox/package.json @@ -47,7 +47,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-bbox/tsconfig.build.json b/packages/turf-bbox/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-bbox/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-bbox/tsconfig.json b/packages/turf-bbox/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-bbox/tsconfig.json +++ b/packages/turf-bbox/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-bbox/tsup.config.ts b/packages/turf-bbox/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-bbox/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-bearing/package.json b/packages/turf-bearing/package.json index 8f0dbc5d31..e4aa9d3a46 100644 --- a/packages/turf-bearing/package.json +++ b/packages/turf-bearing/package.json @@ -43,7 +43,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-bearing/tsconfig.build.json b/packages/turf-bearing/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-bearing/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-bearing/tsconfig.json b/packages/turf-bearing/tsconfig.json index 563bf86442..cbc8f9dd06 100644 --- a/packages/turf-bearing/tsconfig.json +++ b/packages/turf-bearing/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-destination" + } + ] } diff --git a/packages/turf-bearing/tsup.config.ts b/packages/turf-bearing/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-bearing/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-bezier-spline/package.json b/packages/turf-bezier-spline/package.json index b2fa17ca5d..2d62b7534e 100644 --- a/packages/turf-bezier-spline/package.json +++ b/packages/turf-bezier-spline/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-bezier-spline/tsconfig.build.json b/packages/turf-bezier-spline/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-bezier-spline/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-bezier-spline/tsconfig.json b/packages/turf-bezier-spline/tsconfig.json index 563bf86442..58c2e616b1 100644 --- a/packages/turf-bezier-spline/tsconfig.json +++ b/packages/turf-bezier-spline/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-bezier-spline/tsup.config.ts b/packages/turf-bezier-spline/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-bezier-spline/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-clockwise/package.json b/packages/turf-boolean-clockwise/package.json index 726e572951..616b946b97 100644 --- a/packages/turf-boolean-clockwise/package.json +++ b/packages/turf-boolean-clockwise/package.json @@ -50,7 +50,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-clockwise/tsconfig.build.json b/packages/turf-boolean-clockwise/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-clockwise/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-clockwise/tsconfig.json b/packages/turf-boolean-clockwise/tsconfig.json index 563bf86442..58c2e616b1 100644 --- a/packages/turf-boolean-clockwise/tsconfig.json +++ b/packages/turf-boolean-clockwise/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-boolean-clockwise/tsup.config.ts b/packages/turf-boolean-clockwise/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-clockwise/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-concave/package.json b/packages/turf-boolean-concave/package.json index 24d026f11f..4f7c020f70 100644 --- a/packages/turf-boolean-concave/package.json +++ b/packages/turf-boolean-concave/package.json @@ -49,7 +49,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-concave/tsconfig.build.json b/packages/turf-boolean-concave/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-concave/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-concave/tsconfig.json b/packages/turf-boolean-concave/tsconfig.json index 563bf86442..58c2e616b1 100644 --- a/packages/turf-boolean-concave/tsconfig.json +++ b/packages/turf-boolean-concave/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-boolean-concave/tsup.config.ts b/packages/turf-boolean-concave/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-concave/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-contains/package.json b/packages/turf-boolean-contains/package.json index 5f8253fa0c..e83f103f6b 100644 --- a/packages/turf-boolean-contains/package.json +++ b/packages/turf-boolean-contains/package.json @@ -50,7 +50,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-contains/tsconfig.build.json b/packages/turf-boolean-contains/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-contains/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-contains/tsconfig.json b/packages/turf-boolean-contains/tsconfig.json index 563bf86442..78c082052b 100644 --- a/packages/turf-boolean-contains/tsconfig.json +++ b/packages/turf-boolean-contains/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-boolean-point-on-line" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-line-split" + } + ] } diff --git a/packages/turf-boolean-contains/tsup.config.ts b/packages/turf-boolean-contains/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-contains/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-crosses/package.json b/packages/turf-boolean-crosses/package.json index 7aa4ec1064..e6b4be4bea 100644 --- a/packages/turf-boolean-crosses/package.json +++ b/packages/turf-boolean-crosses/package.json @@ -50,7 +50,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-crosses/tsconfig.build.json b/packages/turf-boolean-crosses/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-crosses/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-crosses/tsconfig.json b/packages/turf-boolean-crosses/tsconfig.json index 563bf86442..55032f0e63 100644 --- a/packages/turf-boolean-crosses/tsconfig.json +++ b/packages/turf-boolean-crosses/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-equal" + }, + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-line-intersect" + }, + { + "path": "../turf-polygon-to-line" + } + ] } diff --git a/packages/turf-boolean-crosses/tsup.config.ts b/packages/turf-boolean-crosses/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-crosses/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-disjoint/package.json b/packages/turf-boolean-disjoint/package.json index 73d43792f4..6154f9fd44 100644 --- a/packages/turf-boolean-disjoint/package.json +++ b/packages/turf-boolean-disjoint/package.json @@ -49,7 +49,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-disjoint/tsconfig.build.json b/packages/turf-boolean-disjoint/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-disjoint/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-disjoint/tsconfig.json b/packages/turf-boolean-disjoint/tsconfig.json index 563bf86442..84615fc66f 100644 --- a/packages/turf-boolean-disjoint/tsconfig.json +++ b/packages/turf-boolean-disjoint/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-line-intersect" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-polygon-to-line" + } + ] } diff --git a/packages/turf-boolean-disjoint/tsup.config.ts b/packages/turf-boolean-disjoint/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-disjoint/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-equal/package.json b/packages/turf-boolean-equal/package.json index 5860042f10..a61dde9f46 100644 --- a/packages/turf-boolean-equal/package.json +++ b/packages/turf-boolean-equal/package.json @@ -52,7 +52,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-equal/tsconfig.build.json b/packages/turf-boolean-equal/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-equal/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-equal/tsconfig.json b/packages/turf-boolean-equal/tsconfig.json index 563bf86442..74b2198061 100644 --- a/packages/turf-boolean-equal/tsconfig.json +++ b/packages/turf-boolean-equal/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clean-coords" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-boolean-equal/tsup.config.ts b/packages/turf-boolean-equal/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-equal/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-intersects/package.json b/packages/turf-boolean-intersects/package.json index f0e96b9206..4e0171c2a3 100644 --- a/packages/turf-boolean-intersects/package.json +++ b/packages/turf-boolean-intersects/package.json @@ -50,7 +50,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-intersects/tsconfig.build.json b/packages/turf-boolean-intersects/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-intersects/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-intersects/tsconfig.json b/packages/turf-boolean-intersects/tsconfig.json index 563bf86442..bfbe6623bb 100644 --- a/packages/turf-boolean-intersects/tsconfig.json +++ b/packages/turf-boolean-intersects/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-disjoint" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-boolean-intersects/tsup.config.ts b/packages/turf-boolean-intersects/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-intersects/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-overlap/package.json b/packages/turf-boolean-overlap/package.json index 66f5bb1d92..accefe5945 100644 --- a/packages/turf-boolean-overlap/package.json +++ b/packages/turf-boolean-overlap/package.json @@ -51,7 +51,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-overlap/tsconfig.build.json b/packages/turf-boolean-overlap/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-overlap/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-overlap/tsconfig.json b/packages/turf-boolean-overlap/tsconfig.json index 563bf86442..e2ee68a623 100644 --- a/packages/turf-boolean-overlap/tsconfig.json +++ b/packages/turf-boolean-overlap/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-line-intersect" + }, + { + "path": "../turf-line-overlap" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-boolean-overlap/tsup.config.ts b/packages/turf-boolean-overlap/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-overlap/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-parallel/package.json b/packages/turf-boolean-parallel/package.json index 82ca28f290..2c5dd96dfa 100644 --- a/packages/turf-boolean-parallel/package.json +++ b/packages/turf-boolean-parallel/package.json @@ -48,7 +48,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-parallel/tsconfig.build.json b/packages/turf-boolean-parallel/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-parallel/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-parallel/tsconfig.json b/packages/turf-boolean-parallel/tsconfig.json index 563bf86442..1fc6ded895 100644 --- a/packages/turf-boolean-parallel/tsconfig.json +++ b/packages/turf-boolean-parallel/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clean-coords" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-line-segment" + }, + { + "path": "../turf-rhumb-bearing" + } + ] } diff --git a/packages/turf-boolean-parallel/tsup.config.ts b/packages/turf-boolean-parallel/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-parallel/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-point-in-polygon/package.json b/packages/turf-boolean-point-in-polygon/package.json index b1d19a6859..21252c3c17 100644 --- a/packages/turf-boolean-point-in-polygon/package.json +++ b/packages/turf-boolean-point-in-polygon/package.json @@ -47,7 +47,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-point-in-polygon/tsconfig.build.json b/packages/turf-boolean-point-in-polygon/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-point-in-polygon/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-point-in-polygon/tsconfig.json b/packages/turf-boolean-point-in-polygon/tsconfig.json index 563bf86442..58c2e616b1 100644 --- a/packages/turf-boolean-point-in-polygon/tsconfig.json +++ b/packages/turf-boolean-point-in-polygon/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-boolean-point-in-polygon/tsup.config.ts b/packages/turf-boolean-point-in-polygon/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-point-in-polygon/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-point-on-line/package.json b/packages/turf-boolean-point-on-line/package.json index 28052bc557..45794e2f2d 100644 --- a/packages/turf-boolean-point-on-line/package.json +++ b/packages/turf-boolean-point-on-line/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-point-on-line/tsconfig.build.json b/packages/turf-boolean-point-on-line/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-point-on-line/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-point-on-line/tsconfig.json b/packages/turf-boolean-point-on-line/tsconfig.json index 563bf86442..58c2e616b1 100644 --- a/packages/turf-boolean-point-on-line/tsconfig.json +++ b/packages/turf-boolean-point-on-line/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-boolean-point-on-line/tsup.config.ts b/packages/turf-boolean-point-on-line/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-point-on-line/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-touches/package.json b/packages/turf-boolean-touches/package.json index 83d0e84acc..bfda57c2b4 100644 --- a/packages/turf-boolean-touches/package.json +++ b/packages/turf-boolean-touches/package.json @@ -50,11 +50,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-boolean-touches/tsconfig.build.json b/packages/turf-boolean-touches/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-touches/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-touches/tsconfig.json b/packages/turf-boolean-touches/tsconfig.json index 563bf86442..c36dae87a8 100644 --- a/packages/turf-boolean-touches/tsconfig.json +++ b/packages/turf-boolean-touches/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-boolean-point-on-line" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-boolean-touches/tsconfig.types.json b/packages/turf-boolean-touches/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-boolean-touches/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-boolean-touches/tsup.config.ts b/packages/turf-boolean-touches/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-touches/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-valid/package.json b/packages/turf-boolean-valid/package.json index dd8efb12a0..3807a97b5b 100644 --- a/packages/turf-boolean-valid/package.json +++ b/packages/turf-boolean-valid/package.json @@ -49,7 +49,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-boolean-valid/tsconfig.build.json b/packages/turf-boolean-valid/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-valid/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-valid/tsconfig.json b/packages/turf-boolean-valid/tsconfig.json index 563bf86442..05483956bf 100644 --- a/packages/turf-boolean-valid/tsconfig.json +++ b/packages/turf-boolean-valid/tsconfig.json @@ -1,3 +1,36 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-boolean-crosses" + }, + { + "path": "../turf-boolean-disjoint" + }, + { + "path": "../turf-boolean-overlap" + }, + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-boolean-point-on-line" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-line-intersect" + } + ] } diff --git a/packages/turf-boolean-valid/tsup.config.ts b/packages/turf-boolean-valid/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-valid/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-boolean-within/package.json b/packages/turf-boolean-within/package.json index 3c62ae6e4f..ae13612298 100644 --- a/packages/turf-boolean-within/package.json +++ b/packages/turf-boolean-within/package.json @@ -51,11 +51,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-boolean-within/tsconfig.build.json b/packages/turf-boolean-within/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-boolean-within/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-boolean-within/tsconfig.json b/packages/turf-boolean-within/tsconfig.json index 563bf86442..78c082052b 100644 --- a/packages/turf-boolean-within/tsconfig.json +++ b/packages/turf-boolean-within/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-boolean-point-on-line" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-line-split" + } + ] } diff --git a/packages/turf-boolean-within/tsconfig.types.json b/packages/turf-boolean-within/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-boolean-within/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-boolean-within/tsup.config.ts b/packages/turf-boolean-within/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-boolean-within/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-buffer/package.json b/packages/turf-buffer/package.json index ab142ce44a..19bef10bb5 100644 --- a/packages/turf-buffer/package.json +++ b/packages/turf-buffer/package.json @@ -53,11 +53,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-buffer/tsconfig.build.json b/packages/turf-buffer/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-buffer/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-buffer/tsconfig.json b/packages/turf-buffer/tsconfig.json index 563bf86442..884ca2c750 100644 --- a/packages/turf-buffer/tsconfig.json +++ b/packages/turf-buffer/tsconfig.json @@ -1,3 +1,32 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.js" + ], + "compilerOptions": { + "composite": false, + "allowJs": true, + "checkJs": false, + "noEmit": true + }, + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-center" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-projection" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-buffer/tsconfig.types.json b/packages/turf-buffer/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-buffer/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-buffer/tsup.config.ts b/packages/turf-buffer/tsup.config.ts new file mode 100644 index 0000000000..86235185f6 --- /dev/null +++ b/packages/turf-buffer/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-center-mean/package.json b/packages/turf-center-mean/package.json index 6bd92d48af..99d7e1c86a 100644 --- a/packages/turf-center-mean/package.json +++ b/packages/turf-center-mean/package.json @@ -51,11 +51,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/center": "workspace:*", diff --git a/packages/turf-center-mean/tsconfig.build.json b/packages/turf-center-mean/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-center-mean/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-center-mean/tsconfig.json b/packages/turf-center-mean/tsconfig.json index 563bf86442..541041942d 100644 --- a/packages/turf-center-mean/tsconfig.json +++ b/packages/turf-center-mean/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-center" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-center-mean/tsconfig.types.json b/packages/turf-center-mean/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-center-mean/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-center-mean/tsup.config.ts b/packages/turf-center-mean/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-center-mean/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-center-median/package.json b/packages/turf-center-median/package.json index b0ca1faf3d..3d89864226 100644 --- a/packages/turf-center-median/package.json +++ b/packages/turf-center-median/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-center-median/tsconfig.build.json b/packages/turf-center-median/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-center-median/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-center-median/tsconfig.json b/packages/turf-center-median/tsconfig.json index 563bf86442..333b400b7c 100644 --- a/packages/turf-center-median/tsconfig.json +++ b/packages/turf-center-median/tsconfig.json @@ -1,3 +1,36 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-center-mean" + }, + { + "path": "../turf-centroid" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-center" + }, + { + "path": "../turf-center-of-mass" + }, + { + "path": "../turf-random" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-center-median/tsup.config.ts b/packages/turf-center-median/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-center-median/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-center-of-mass/package.json b/packages/turf-center-of-mass/package.json index 7e34dd92be..60095a1b2a 100644 --- a/packages/turf-center-of-mass/package.json +++ b/packages/turf-center-of-mass/package.json @@ -43,11 +43,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-center-of-mass/tsconfig.build.json b/packages/turf-center-of-mass/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-center-of-mass/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-center-of-mass/tsconfig.json b/packages/turf-center-of-mass/tsconfig.json index 563bf86442..d8ac8a56f7 100644 --- a/packages/turf-center-of-mass/tsconfig.json +++ b/packages/turf-center-of-mass/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-centroid" + }, + { + "path": "../turf-convex" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-center-of-mass/tsconfig.types.json b/packages/turf-center-of-mass/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-center-of-mass/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-center-of-mass/tsup.config.ts b/packages/turf-center-of-mass/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-center-of-mass/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-center/package.json b/packages/turf-center/package.json index 2b73577470..4cf4589e64 100644 --- a/packages/turf-center/package.json +++ b/packages/turf-center/package.json @@ -47,11 +47,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:*", diff --git a/packages/turf-center/tsconfig.build.json b/packages/turf-center/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-center/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-center/tsconfig.json b/packages/turf-center/tsconfig.json index 563bf86442..66e5d7b5cd 100644 --- a/packages/turf-center/tsconfig.json +++ b/packages/turf-center/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-center/tsconfig.types.json b/packages/turf-center/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-center/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-center/tsup.config.ts b/packages/turf-center/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-center/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-centroid/package.json b/packages/turf-centroid/package.json index c7ac1e9d05..0ff338ff7d 100644 --- a/packages/turf-centroid/package.json +++ b/packages/turf-centroid/package.json @@ -45,11 +45,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-centroid/tsconfig.build.json b/packages/turf-centroid/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-centroid/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-centroid/tsconfig.json b/packages/turf-centroid/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-centroid/tsconfig.json +++ b/packages/turf-centroid/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-centroid/tsconfig.types.json b/packages/turf-centroid/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-centroid/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-centroid/tsup.config.ts b/packages/turf-centroid/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-centroid/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-circle/package.json b/packages/turf-circle/package.json index a5d60d9dd0..7f88a27ecc 100644 --- a/packages/turf-circle/package.json +++ b/packages/turf-circle/package.json @@ -47,11 +47,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@placemarkio/check-geojson": "^0.1.12", diff --git a/packages/turf-circle/tsconfig.build.json b/packages/turf-circle/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-circle/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-circle/tsconfig.json b/packages/turf-circle/tsconfig.json index 563bf86442..f5f9cc4d07 100644 --- a/packages/turf-circle/tsconfig.json +++ b/packages/turf-circle/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-destination" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-circle/tsconfig.types.json b/packages/turf-circle/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-circle/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-circle/tsup.config.ts b/packages/turf-circle/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-circle/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-clean-coords/package.json b/packages/turf-clean-coords/package.json index e39da74092..efc9ddfd3b 100644 --- a/packages/turf-clean-coords/package.json +++ b/packages/turf-clean-coords/package.json @@ -48,11 +48,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-clean-coords/tsconfig.build.json b/packages/turf-clean-coords/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-clean-coords/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-clean-coords/tsconfig.json b/packages/turf-clean-coords/tsconfig.json index 563bf86442..bc8858c0eb 100644 --- a/packages/turf-clean-coords/tsconfig.json +++ b/packages/turf-clean-coords/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-point-on-line" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-clean-coords/tsconfig.types.json b/packages/turf-clean-coords/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-clean-coords/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-clean-coords/tsup.config.ts b/packages/turf-clean-coords/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-clean-coords/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-clone/package.json b/packages/turf-clone/package.json index 3e5367dd5d..28d808de18 100644 --- a/packages/turf-clone/package.json +++ b/packages/turf-clone/package.json @@ -46,11 +46,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/meta": "workspace:*", diff --git a/packages/turf-clone/tsconfig.build.json b/packages/turf-clone/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-clone/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-clone/tsconfig.json b/packages/turf-clone/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-clone/tsconfig.json +++ b/packages/turf-clone/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-clone/tsconfig.types.json b/packages/turf-clone/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-clone/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-clone/tsup.config.ts b/packages/turf-clone/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-clone/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-clusters-dbscan/package.json b/packages/turf-clusters-dbscan/package.json index 70031b96a5..990a531d21 100644 --- a/packages/turf-clusters-dbscan/package.json +++ b/packages/turf-clusters-dbscan/package.json @@ -53,11 +53,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/centroid": "workspace:*", diff --git a/packages/turf-clusters-dbscan/tsconfig.build.json b/packages/turf-clusters-dbscan/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-clusters-dbscan/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-clusters-dbscan/tsconfig.json b/packages/turf-clusters-dbscan/tsconfig.json index 563bf86442..04514a25c6 100644 --- a/packages/turf-clusters-dbscan/tsconfig.json +++ b/packages/turf-clusters-dbscan/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clone" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-centroid" + }, + { + "path": "../turf-clusters" + } + ] } diff --git a/packages/turf-clusters-dbscan/tsconfig.types.json b/packages/turf-clusters-dbscan/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-clusters-dbscan/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-clusters-dbscan/tsup.config.ts b/packages/turf-clusters-dbscan/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-clusters-dbscan/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-clusters-kmeans/package.json b/packages/turf-clusters-kmeans/package.json index 58ec1ade21..b0504e2bc9 100644 --- a/packages/turf-clusters-kmeans/package.json +++ b/packages/turf-clusters-kmeans/package.json @@ -52,11 +52,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/centroid": "workspace:*", diff --git a/packages/turf-clusters-kmeans/tsconfig.build.json b/packages/turf-clusters-kmeans/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-clusters-kmeans/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-clusters-kmeans/tsconfig.json b/packages/turf-clusters-kmeans/tsconfig.json index 563bf86442..0037cd50fe 100644 --- a/packages/turf-clusters-kmeans/tsconfig.json +++ b/packages/turf-clusters-kmeans/tsconfig.json @@ -1,3 +1,30 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-centroid" + }, + { + "path": "../turf-clusters" + }, + { + "path": "../turf-random" + } + ] } diff --git a/packages/turf-clusters-kmeans/tsconfig.types.json b/packages/turf-clusters-kmeans/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-clusters-kmeans/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-clusters-kmeans/tsup.config.ts b/packages/turf-clusters-kmeans/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-clusters-kmeans/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-clusters/package.json b/packages/turf-clusters/package.json index 5b387466e6..1adaba2723 100644 --- a/packages/turf-clusters/package.json +++ b/packages/turf-clusters/package.json @@ -49,11 +49,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-clusters/tsconfig.build.json b/packages/turf-clusters/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-clusters/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-clusters/tsconfig.json b/packages/turf-clusters/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-clusters/tsconfig.json +++ b/packages/turf-clusters/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-clusters/tsconfig.types.json b/packages/turf-clusters/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-clusters/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-clusters/tsup.config.ts b/packages/turf-clusters/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-clusters/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-collect/package.json b/packages/turf-collect/package.json index ada0c8cedd..57b2522126 100644 --- a/packages/turf-collect/package.json +++ b/packages/turf-collect/package.json @@ -50,7 +50,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-collect/tsconfig.build.json b/packages/turf-collect/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-collect/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-collect/tsconfig.json b/packages/turf-collect/tsconfig.json index 563bf86442..e87e5df417 100644 --- a/packages/turf-collect/tsconfig.json +++ b/packages/turf-collect/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-collect/tsup.config.ts b/packages/turf-collect/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-collect/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-combine/package.json b/packages/turf-combine/package.json index f2dffb4d4e..c2b59bf56b 100644 --- a/packages/turf-combine/package.json +++ b/packages/turf-combine/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-combine/tsconfig.build.json b/packages/turf-combine/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-combine/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-combine/tsconfig.json b/packages/turf-combine/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-combine/tsconfig.json +++ b/packages/turf-combine/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-combine/tsup.config.ts b/packages/turf-combine/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-combine/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-concave/package.json b/packages/turf-concave/package.json index da6788ac87..9188262fd2 100644 --- a/packages/turf-concave/package.json +++ b/packages/turf-concave/package.json @@ -56,7 +56,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-concave/tsconfig.build.json b/packages/turf-concave/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-concave/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-concave/tsconfig.json b/packages/turf-concave/tsconfig.json index 563bf86442..195b8c233a 100644 --- a/packages/turf-concave/tsconfig.json +++ b/packages/turf-concave/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clone" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-tin" + } + ] } diff --git a/packages/turf-concave/tsup.config.ts b/packages/turf-concave/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-concave/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-convex/package.json b/packages/turf-convex/package.json index 0471d02073..c538e97b52 100644 --- a/packages/turf-convex/package.json +++ b/packages/turf-convex/package.json @@ -43,7 +43,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-convex/tsconfig.build.json b/packages/turf-convex/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-convex/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-convex/tsconfig.json b/packages/turf-convex/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-convex/tsconfig.json +++ b/packages/turf-convex/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-convex/tsup.config.ts b/packages/turf-convex/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-convex/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-destination/package.json b/packages/turf-destination/package.json index c721d72bab..0714c2fc88 100644 --- a/packages/turf-destination/package.json +++ b/packages/turf-destination/package.json @@ -50,7 +50,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-destination/tsconfig.build.json b/packages/turf-destination/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-destination/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-destination/tsconfig.json b/packages/turf-destination/tsconfig.json index 563bf86442..fa5e53a52b 100644 --- a/packages/turf-destination/tsconfig.json +++ b/packages/turf-destination/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-destination/tsup.config.ts b/packages/turf-destination/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-destination/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-difference/package.json b/packages/turf-difference/package.json index ad2d1db2e4..52726f109e 100644 --- a/packages/turf-difference/package.json +++ b/packages/turf-difference/package.json @@ -43,7 +43,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-difference/tsconfig.build.json b/packages/turf-difference/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-difference/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-difference/tsconfig.json b/packages/turf-difference/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-difference/tsconfig.json +++ b/packages/turf-difference/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-difference/tsup.config.ts b/packages/turf-difference/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-difference/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-directional-mean/package.json b/packages/turf-directional-mean/package.json index f7d9bc68fb..ef8a593954 100644 --- a/packages/turf-directional-mean/package.json +++ b/packages/turf-directional-mean/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-directional-mean/tsconfig.build.json b/packages/turf-directional-mean/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-directional-mean/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-directional-mean/tsconfig.json b/packages/turf-directional-mean/tsconfig.json index 563bf86442..76ac0cc801 100644 --- a/packages/turf-directional-mean/tsconfig.json +++ b/packages/turf-directional-mean/tsconfig.json @@ -1,3 +1,30 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bearing" + }, + { + "path": "../turf-centroid" + }, + { + "path": "../turf-destination" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-length" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-directional-mean/tsup.config.ts b/packages/turf-directional-mean/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-directional-mean/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-dissolve/package.json b/packages/turf-dissolve/package.json index 5aa7a6eb9f..85fbba972c 100644 --- a/packages/turf-dissolve/package.json +++ b/packages/turf-dissolve/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-dissolve/tsconfig.build.json b/packages/turf-dissolve/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-dissolve/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-dissolve/tsconfig.json b/packages/turf-dissolve/tsconfig.json index 563bf86442..f0fe77fb0c 100644 --- a/packages/turf-dissolve/tsconfig.json +++ b/packages/turf-dissolve/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-flatten" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-dissolve/tsup.config.ts b/packages/turf-dissolve/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-dissolve/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-distance-weight/package.json b/packages/turf-distance-weight/package.json index 6691e52789..67a9c60b54 100644 --- a/packages/turf-distance-weight/package.json +++ b/packages/turf-distance-weight/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-distance-weight/tsconfig.build.json b/packages/turf-distance-weight/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-distance-weight/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-distance-weight/tsconfig.json b/packages/turf-distance-weight/tsconfig.json index 563bf86442..14ce280364 100644 --- a/packages/turf-distance-weight/tsconfig.json +++ b/packages/turf-distance-weight/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-centroid" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-distance-weight/tsup.config.ts b/packages/turf-distance-weight/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-distance-weight/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-distance/package.json b/packages/turf-distance/package.json index 35228e8263..54f9a83048 100644 --- a/packages/turf-distance/package.json +++ b/packages/turf-distance/package.json @@ -45,7 +45,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-distance/tsconfig.build.json b/packages/turf-distance/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-distance/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-distance/tsconfig.json b/packages/turf-distance/tsconfig.json index 563bf86442..58c2e616b1 100644 --- a/packages/turf-distance/tsconfig.json +++ b/packages/turf-distance/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-distance/tsup.config.ts b/packages/turf-distance/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-distance/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-ellipse/package.json b/packages/turf-ellipse/package.json index 869472be2a..abfa3d3aec 100644 --- a/packages/turf-ellipse/package.json +++ b/packages/turf-ellipse/package.json @@ -47,7 +47,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-ellipse/tsconfig.build.json b/packages/turf-ellipse/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-ellipse/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-ellipse/tsconfig.json b/packages/turf-ellipse/tsconfig.json index 563bf86442..4f4a724a4a 100644 --- a/packages/turf-ellipse/tsconfig.json +++ b/packages/turf-ellipse/tsconfig.json @@ -1,3 +1,39 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-destination" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-transform-rotate" + }, + { + "path": "../turf-area" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-circle" + }, + { + "path": "../turf-intersect" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-ellipse/tsup.config.ts b/packages/turf-ellipse/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-ellipse/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-envelope/package.json b/packages/turf-envelope/package.json index 9cbfefe50a..473857dcb5 100644 --- a/packages/turf-envelope/package.json +++ b/packages/turf-envelope/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-envelope/tsconfig.build.json b/packages/turf-envelope/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-envelope/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-envelope/tsconfig.json b/packages/turf-envelope/tsconfig.json index 563bf86442..cce690d543 100644 --- a/packages/turf-envelope/tsconfig.json +++ b/packages/turf-envelope/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-envelope/tsup.config.ts b/packages/turf-envelope/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-envelope/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-explode/package.json b/packages/turf-explode/package.json index 05e4468f96..6b05ae118e 100644 --- a/packages/turf-explode/package.json +++ b/packages/turf-explode/package.json @@ -45,7 +45,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-explode/tsconfig.build.json b/packages/turf-explode/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-explode/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-explode/tsconfig.json b/packages/turf-explode/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-explode/tsconfig.json +++ b/packages/turf-explode/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-explode/tsup.config.ts b/packages/turf-explode/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-explode/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-flatten/package.json b/packages/turf-flatten/package.json index ab3cf22edb..53ff48a6b1 100644 --- a/packages/turf-flatten/package.json +++ b/packages/turf-flatten/package.json @@ -50,11 +50,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-flatten/tsconfig.build.json b/packages/turf-flatten/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-flatten/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-flatten/tsconfig.json b/packages/turf-flatten/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-flatten/tsconfig.json +++ b/packages/turf-flatten/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-flatten/tsconfig.types.json b/packages/turf-flatten/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-flatten/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-flatten/tsup.config.ts b/packages/turf-flatten/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-flatten/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-flip/package.json b/packages/turf-flip/package.json index 65996e0dc1..cfae3b1525 100644 --- a/packages/turf-flip/package.json +++ b/packages/turf-flip/package.json @@ -45,11 +45,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-flip/tsconfig.build.json b/packages/turf-flip/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-flip/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-flip/tsconfig.json b/packages/turf-flip/tsconfig.json index 563bf86442..79aa2341a7 100644 --- a/packages/turf-flip/tsconfig.json +++ b/packages/turf-flip/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-flip/tsconfig.types.json b/packages/turf-flip/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-flip/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-flip/tsup.config.ts b/packages/turf-flip/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-flip/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-geojson-rbush/package.json b/packages/turf-geojson-rbush/package.json index 46909c64f6..c754493450 100644 --- a/packages/turf-geojson-rbush/package.json +++ b/packages/turf-geojson-rbush/package.json @@ -51,11 +51,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:*", diff --git a/packages/turf-geojson-rbush/tsconfig.build.json b/packages/turf-geojson-rbush/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-geojson-rbush/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-geojson-rbush/tsconfig.json b/packages/turf-geojson-rbush/tsconfig.json index 563bf86442..b80ad79dca 100644 --- a/packages/turf-geojson-rbush/tsconfig.json +++ b/packages/turf-geojson-rbush/tsconfig.json @@ -1,3 +1,29 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.js" + ], + "compilerOptions": { + "composite": false, + "allowJs": true, + "checkJs": false, + "noEmit": true + }, + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-random" + } + ] } diff --git a/packages/turf-geojson-rbush/tsconfig.types.json b/packages/turf-geojson-rbush/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-geojson-rbush/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-geojson-rbush/tsup.config.ts b/packages/turf-geojson-rbush/tsup.config.ts new file mode 100644 index 0000000000..86235185f6 --- /dev/null +++ b/packages/turf-geojson-rbush/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-great-circle/package.json b/packages/turf-great-circle/package.json index 8711fe0416..5aff1dd9f0 100644 --- a/packages/turf-great-circle/package.json +++ b/packages/turf-great-circle/package.json @@ -52,11 +52,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-great-circle/tsconfig.build.json b/packages/turf-great-circle/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-great-circle/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-great-circle/tsconfig.json b/packages/turf-great-circle/tsconfig.json index 563bf86442..fa5e53a52b 100644 --- a/packages/turf-great-circle/tsconfig.json +++ b/packages/turf-great-circle/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-great-circle/tsconfig.types.json b/packages/turf-great-circle/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-great-circle/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-great-circle/tsup.config.ts b/packages/turf-great-circle/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-great-circle/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-helpers/package.json b/packages/turf-helpers/package.json index 95da1f9525..a22c59e499 100644 --- a/packages/turf-helpers/package.json +++ b/packages/turf-helpers/package.json @@ -51,11 +51,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-helpers/tsconfig.build.json b/packages/turf-helpers/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-helpers/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-helpers/tsconfig.json b/packages/turf-helpers/tsconfig.json index 563bf86442..2aa4968a91 100644 --- a/packages/turf-helpers/tsconfig.json +++ b/packages/turf-helpers/tsconfig.json @@ -1,3 +1,8 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [] } diff --git a/packages/turf-helpers/tsconfig.types.json b/packages/turf-helpers/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-helpers/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-helpers/tsup.config.ts b/packages/turf-helpers/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-helpers/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-hex-grid/package.json b/packages/turf-hex-grid/package.json index e8b4ee2470..362fa1cf20 100644 --- a/packages/turf-hex-grid/package.json +++ b/packages/turf-hex-grid/package.json @@ -55,11 +55,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:*", diff --git a/packages/turf-hex-grid/tsconfig.build.json b/packages/turf-hex-grid/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-hex-grid/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-hex-grid/tsconfig.json b/packages/turf-hex-grid/tsconfig.json index 563bf86442..3bfafc8ec5 100644 --- a/packages/turf-hex-grid/tsconfig.json +++ b/packages/turf-hex-grid/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-intersect" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-hex-grid/tsconfig.types.json b/packages/turf-hex-grid/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-hex-grid/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-hex-grid/tsup.config.ts b/packages/turf-hex-grid/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-hex-grid/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-interpolate/package.json b/packages/turf-interpolate/package.json index da86b2f823..5b174bb588 100644 --- a/packages/turf-interpolate/package.json +++ b/packages/turf-interpolate/package.json @@ -47,11 +47,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-interpolate/tsconfig.build.json b/packages/turf-interpolate/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-interpolate/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-interpolate/tsconfig.json b/packages/turf-interpolate/tsconfig.json index 563bf86442..36e7004f42 100644 --- a/packages/turf-interpolate/tsconfig.json +++ b/packages/turf-interpolate/tsconfig.json @@ -1,3 +1,45 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-centroid" + }, + { + "path": "../turf-clone" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-hex-grid" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-point-grid" + }, + { + "path": "../turf-square-grid" + }, + { + "path": "../turf-triangle-grid" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-interpolate/tsconfig.types.json b/packages/turf-interpolate/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-interpolate/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-interpolate/tsup.config.ts b/packages/turf-interpolate/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-interpolate/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-intersect/package.json b/packages/turf-intersect/package.json index c1993216a1..bd30732a3d 100644 --- a/packages/turf-intersect/package.json +++ b/packages/turf-intersect/package.json @@ -44,11 +44,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-intersect/tsconfig.build.json b/packages/turf-intersect/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-intersect/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-intersect/tsconfig.json b/packages/turf-intersect/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-intersect/tsconfig.json +++ b/packages/turf-intersect/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-intersect/tsconfig.types.json b/packages/turf-intersect/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-intersect/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-intersect/tsup.config.ts b/packages/turf-intersect/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-intersect/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-invariant/package.json b/packages/turf-invariant/package.json index 0503cfc299..420f47f53b 100644 --- a/packages/turf-invariant/package.json +++ b/packages/turf-invariant/package.json @@ -48,11 +48,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-invariant/tsconfig.build.json b/packages/turf-invariant/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-invariant/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-invariant/tsconfig.json b/packages/turf-invariant/tsconfig.json index 563bf86442..d777551892 100644 --- a/packages/turf-invariant/tsconfig.json +++ b/packages/turf-invariant/tsconfig.json @@ -1,3 +1,12 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-invariant/tsconfig.types.json b/packages/turf-invariant/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-invariant/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-invariant/tsup.config.ts b/packages/turf-invariant/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-invariant/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-isobands/package.json b/packages/turf-isobands/package.json index 43fb3476d0..2453034935 100644 --- a/packages/turf-isobands/package.json +++ b/packages/turf-isobands/package.json @@ -52,7 +52,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-isobands/tsconfig.build.json b/packages/turf-isobands/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-isobands/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-isobands/tsconfig.json b/packages/turf-isobands/tsconfig.json index 563bf86442..6264e0acde 100644 --- a/packages/turf-isobands/tsconfig.json +++ b/packages/turf-isobands/tsconfig.json @@ -1,3 +1,45 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-area" + }, + { + "path": "../turf-bbox" + }, + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-explode" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-envelope" + }, + { + "path": "../turf-point-grid" + }, + { + "path": "../turf-random" + }, + { + "path": "../turf-rhumb-destination" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-isobands/tsup.config.ts b/packages/turf-isobands/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-isobands/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-isolines/package.json b/packages/turf-isolines/package.json index f55d497060..35f0643294 100644 --- a/packages/turf-isolines/package.json +++ b/packages/turf-isolines/package.json @@ -51,11 +51,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/envelope": "workspace:*", diff --git a/packages/turf-isolines/tsconfig.build.json b/packages/turf-isolines/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-isolines/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-isolines/tsconfig.json b/packages/turf-isolines/tsconfig.json index 563bf86442..f1c312684f 100644 --- a/packages/turf-isolines/tsconfig.json +++ b/packages/turf-isolines/tsconfig.json @@ -1,3 +1,36 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-envelope" + }, + { + "path": "../turf-point-grid" + }, + { + "path": "../turf-random" + }, + { + "path": "../turf-rhumb-destination" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-isolines/tsconfig.types.json b/packages/turf-isolines/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-isolines/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-isolines/tsup.config.ts b/packages/turf-isolines/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-isolines/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-kinks/lib/sweepline-intersections-export.ts b/packages/turf-kinks/lib/sweepline-intersections-export.ts deleted file mode 100644 index 2d10f64b69..0000000000 --- a/packages/turf-kinks/lib/sweepline-intersections-export.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Get around problems with moduleResolution node16 and some older libraries. -// Manifests as "This expression is not callable ... has no call signatures" -// https://stackoverflow.com/a/74709714 - -import lib from "sweepline-intersections"; - -export const sweeplineIntersections = lib as unknown as typeof lib.default; diff --git a/packages/turf-kinks/package.json b/packages/turf-kinks/package.json index b236d46458..81b7a7e6d8 100644 --- a/packages/turf-kinks/package.json +++ b/packages/turf-kinks/package.json @@ -44,11 +44,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/meta": "workspace:*", diff --git a/packages/turf-kinks/tsconfig.build.json b/packages/turf-kinks/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-kinks/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-kinks/tsconfig.json b/packages/turf-kinks/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-kinks/tsconfig.json +++ b/packages/turf-kinks/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-kinks/tsconfig.types.json b/packages/turf-kinks/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-kinks/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-kinks/tsup.config.ts b/packages/turf-kinks/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-kinks/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-length/package.json b/packages/turf-length/package.json index 1684a126a8..5c053b309f 100644 --- a/packages/turf-length/package.json +++ b/packages/turf-length/package.json @@ -51,7 +51,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-length/tsconfig.build.json b/packages/turf-length/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-length/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-length/tsconfig.json b/packages/turf-length/tsconfig.json index 563bf86442..3392d2cf5a 100644 --- a/packages/turf-length/tsconfig.json +++ b/packages/turf-length/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-length/tsup.config.ts b/packages/turf-length/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-length/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-arc/package.json b/packages/turf-line-arc/package.json index 2ad6258e02..6372ceca97 100644 --- a/packages/turf-line-arc/package.json +++ b/packages/turf-line-arc/package.json @@ -43,11 +43,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-line-arc/tsconfig.build.json b/packages/turf-line-arc/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-arc/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-arc/tsconfig.json b/packages/turf-line-arc/tsconfig.json index 563bf86442..8c09c53b7a 100644 --- a/packages/turf-line-arc/tsconfig.json +++ b/packages/turf-line-arc/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-circle" + }, + { + "path": "../turf-destination" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-line-arc/tsconfig.types.json b/packages/turf-line-arc/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-line-arc/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-line-arc/tsup.config.ts b/packages/turf-line-arc/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-line-arc/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-chunk/package.json b/packages/turf-line-chunk/package.json index 0c2e4f21f8..baebb0800a 100644 --- a/packages/turf-line-chunk/package.json +++ b/packages/turf-line-chunk/package.json @@ -52,11 +52,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-line-chunk/tsconfig.build.json b/packages/turf-line-chunk/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-chunk/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-chunk/tsconfig.json b/packages/turf-line-chunk/tsconfig.json index 563bf86442..57099e2896 100644 --- a/packages/turf-line-chunk/tsconfig.json +++ b/packages/turf-line-chunk/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-length" + }, + { + "path": "../turf-line-slice-along" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-line-chunk/tsconfig.types.json b/packages/turf-line-chunk/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-line-chunk/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-line-chunk/tsup.config.ts b/packages/turf-line-chunk/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-line-chunk/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-intersect/index.ts b/packages/turf-line-intersect/index.ts index 7e29778961..c953be27f2 100644 --- a/packages/turf-line-intersect/index.ts +++ b/packages/turf-line-intersect/index.ts @@ -9,7 +9,7 @@ import { Polygon, } from "geojson"; import type { Intersection } from "sweepline-intersections"; -import { sweeplineIntersections as findIntersections } from "./lib/sweepline-intersections-export.js"; +import findIntersections from "sweepline-intersections"; /** * Takes any LineString or Polygon GeoJSON and returns the intersecting point(s). @@ -74,7 +74,7 @@ function lineIntersect< let results: Intersection[] = []; if (removeDuplicates) { const unique: Record = {}; - intersections.forEach((intersection) => { + intersections.forEach((intersection: Intersection) => { const key = intersection.join(","); if (!unique[key]) { unique[key] = true; diff --git a/packages/turf-line-intersect/lib/sweepline-intersections-export.ts b/packages/turf-line-intersect/lib/sweepline-intersections-export.ts deleted file mode 100644 index 2d10f64b69..0000000000 --- a/packages/turf-line-intersect/lib/sweepline-intersections-export.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Get around problems with moduleResolution node16 and some older libraries. -// Manifests as "This expression is not callable ... has no call signatures" -// https://stackoverflow.com/a/74709714 - -import lib from "sweepline-intersections"; - -export const sweeplineIntersections = lib as unknown as typeof lib.default; diff --git a/packages/turf-line-intersect/package.json b/packages/turf-line-intersect/package.json index 2f6665c506..9a11b4f2bb 100644 --- a/packages/turf-line-intersect/package.json +++ b/packages/turf-line-intersect/package.json @@ -50,7 +50,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-line-intersect/tsconfig.build.json b/packages/turf-line-intersect/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-intersect/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-intersect/tsconfig.json b/packages/turf-line-intersect/tsconfig.json index 563bf86442..d2c581e530 100644 --- a/packages/turf-line-intersect/tsconfig.json +++ b/packages/turf-line-intersect/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-line-intersect/tsup.config.ts b/packages/turf-line-intersect/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-line-intersect/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-offset/package.json b/packages/turf-line-offset/package.json index b9fc322209..f5b38dba57 100644 --- a/packages/turf-line-offset/package.json +++ b/packages/turf-line-offset/package.json @@ -50,11 +50,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-line-offset/tsconfig.build.json b/packages/turf-line-offset/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-offset/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-offset/tsconfig.json b/packages/turf-line-offset/tsconfig.json index 563bf86442..909609609d 100644 --- a/packages/turf-line-offset/tsconfig.json +++ b/packages/turf-line-offset/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-line-offset/tsconfig.types.json b/packages/turf-line-offset/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-line-offset/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-line-offset/tsup.config.ts b/packages/turf-line-offset/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-line-offset/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-overlap/package.json b/packages/turf-line-overlap/package.json index 76cc0c22b9..f41d3aa96a 100644 --- a/packages/turf-line-overlap/package.json +++ b/packages/turf-line-overlap/package.json @@ -49,11 +49,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-line-overlap/tsconfig.build.json b/packages/turf-line-overlap/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-overlap/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-overlap/tsconfig.json b/packages/turf-line-overlap/tsconfig.json index 563bf86442..4d8f1fd168 100644 --- a/packages/turf-line-overlap/tsconfig.json +++ b/packages/turf-line-overlap/tsconfig.json @@ -1,3 +1,30 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-point-on-line" + }, + { + "path": "../turf-geojson-rbush" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-line-segment" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-nearest-point-on-line" + } + ] } diff --git a/packages/turf-line-overlap/tsconfig.types.json b/packages/turf-line-overlap/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-line-overlap/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-line-overlap/tsup.config.ts b/packages/turf-line-overlap/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-line-overlap/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-segment/package.json b/packages/turf-line-segment/package.json index 1c760f2ae7..3e44aebd34 100644 --- a/packages/turf-line-segment/package.json +++ b/packages/turf-line-segment/package.json @@ -44,7 +44,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-line-segment/tsconfig.build.json b/packages/turf-line-segment/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-segment/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-segment/tsconfig.json b/packages/turf-line-segment/tsconfig.json index 563bf86442..57398567c0 100644 --- a/packages/turf-line-segment/tsconfig.json +++ b/packages/turf-line-segment/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-line-segment/tsup.config.ts b/packages/turf-line-segment/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-line-segment/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-slice-along/package.json b/packages/turf-line-slice-along/package.json index bf72739576..270ec4d926 100644 --- a/packages/turf-line-slice-along/package.json +++ b/packages/turf-line-slice-along/package.json @@ -44,7 +44,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-line-slice-along/tsconfig.build.json b/packages/turf-line-slice-along/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-slice-along/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-slice-along/tsconfig.json b/packages/turf-line-slice-along/tsconfig.json index 563bf86442..9ddc569137 100644 --- a/packages/turf-line-slice-along/tsconfig.json +++ b/packages/turf-line-slice-along/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bearing" + }, + { + "path": "../turf-destination" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-along" + }, + { + "path": "../turf-length" + } + ] } diff --git a/packages/turf-line-slice-along/tsup.config.ts b/packages/turf-line-slice-along/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-line-slice-along/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-slice/package.json b/packages/turf-line-slice/package.json index fe328983a5..27940c1e6c 100644 --- a/packages/turf-line-slice/package.json +++ b/packages/turf-line-slice/package.json @@ -48,7 +48,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-line-slice/tsconfig.build.json b/packages/turf-line-slice/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-slice/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-slice/tsconfig.json b/packages/turf-line-slice/tsconfig.json index 563bf86442..ac9e8c34de 100644 --- a/packages/turf-line-slice/tsconfig.json +++ b/packages/turf-line-slice/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-nearest-point-on-line" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-line-slice/tsup.config.ts b/packages/turf-line-slice/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-line-slice/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-split/package.json b/packages/turf-line-split/package.json index 54edf729ff..362c8655df 100644 --- a/packages/turf-line-split/package.json +++ b/packages/turf-line-split/package.json @@ -49,7 +49,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-line-split/tsconfig.build.json b/packages/turf-line-split/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-split/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-split/tsconfig.json b/packages/turf-line-split/tsconfig.json index 563bf86442..7f28df4c68 100644 --- a/packages/turf-line-split/tsconfig.json +++ b/packages/turf-line-split/tsconfig.json @@ -1,3 +1,41 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.js" + ], + "compilerOptions": { + "composite": false, + "allowJs": true, + "checkJs": false, + "noEmit": true + }, + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-geojson-rbush" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-line-intersect" + }, + { + "path": "../turf-line-segment" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-nearest-point-on-line" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-line-split/tsup.config.ts b/packages/turf-line-split/tsup.config.ts new file mode 100644 index 0000000000..86235185f6 --- /dev/null +++ b/packages/turf-line-split/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-line-to-polygon/package.json b/packages/turf-line-to-polygon/package.json index 3fca80a9fc..802c1d3dfd 100644 --- a/packages/turf-line-to-polygon/package.json +++ b/packages/turf-line-to-polygon/package.json @@ -49,11 +49,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-line-to-polygon/tsconfig.build.json b/packages/turf-line-to-polygon/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-line-to-polygon/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-line-to-polygon/tsconfig.json b/packages/turf-line-to-polygon/tsconfig.json index 563bf86442..0ca298c21b 100644 --- a/packages/turf-line-to-polygon/tsconfig.json +++ b/packages/turf-line-to-polygon/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-line-to-polygon/tsconfig.types.json b/packages/turf-line-to-polygon/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-line-to-polygon/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-line-to-polygon/tsup.config.ts b/packages/turf-line-to-polygon/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-line-to-polygon/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-mask/package.json b/packages/turf-mask/package.json index 7e7eef5c41..26c5ca1aee 100644 --- a/packages/turf-mask/package.json +++ b/packages/turf-mask/package.json @@ -44,11 +44,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-mask/tsconfig.build.json b/packages/turf-mask/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-mask/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-mask/tsconfig.json b/packages/turf-mask/tsconfig.json index 563bf86442..3c0de81cda 100644 --- a/packages/turf-mask/tsconfig.json +++ b/packages/turf-mask/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-mask/tsconfig.types.json b/packages/turf-mask/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-mask/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-mask/tsup.config.ts b/packages/turf-mask/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-mask/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-meta/package.json b/packages/turf-meta/package.json index 1ccf7021b6..96a3cd6e98 100644 --- a/packages/turf-meta/package.json +++ b/packages/turf-meta/package.json @@ -66,11 +66,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/random": "workspace:*", diff --git a/packages/turf-meta/tsconfig.build.json b/packages/turf-meta/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-meta/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-meta/tsconfig.json b/packages/turf-meta/tsconfig.json index 563bf86442..8c8aaf2b1d 100644 --- a/packages/turf-meta/tsconfig.json +++ b/packages/turf-meta/tsconfig.json @@ -1,3 +1,20 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.js" + ], + "compilerOptions": { + "composite": false, + "allowJs": true, + "checkJs": false, + "noEmit": true + }, + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-random" + } + ] } diff --git a/packages/turf-meta/tsconfig.types.json b/packages/turf-meta/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-meta/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-meta/tsup.config.ts b/packages/turf-meta/tsup.config.ts new file mode 100644 index 0000000000..86235185f6 --- /dev/null +++ b/packages/turf-meta/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-midpoint/package.json b/packages/turf-midpoint/package.json index ef260a3c36..71944ca5a6 100644 --- a/packages/turf-midpoint/package.json +++ b/packages/turf-midpoint/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-midpoint/tsconfig.build.json b/packages/turf-midpoint/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-midpoint/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-midpoint/tsconfig.json b/packages/turf-midpoint/tsconfig.json index 563bf86442..bca853275d 100644 --- a/packages/turf-midpoint/tsconfig.json +++ b/packages/turf-midpoint/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bearing" + }, + { + "path": "../turf-destination" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-midpoint/tsup.config.ts b/packages/turf-midpoint/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-midpoint/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-moran-index/package.json b/packages/turf-moran-index/package.json index cfa76ec127..2d4e9bbcbc 100644 --- a/packages/turf-moran-index/package.json +++ b/packages/turf-moran-index/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-moran-index/tsconfig.build.json b/packages/turf-moran-index/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-moran-index/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-moran-index/tsconfig.json b/packages/turf-moran-index/tsconfig.json index 563bf86442..0170f00fa3 100644 --- a/packages/turf-moran-index/tsconfig.json +++ b/packages/turf-moran-index/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-distance-weight" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-moran-index/tsup.config.ts b/packages/turf-moran-index/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-moran-index/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-nearest-neighbor-analysis/package.json b/packages/turf-nearest-neighbor-analysis/package.json index 5012318733..e63837d59c 100644 --- a/packages/turf-nearest-neighbor-analysis/package.json +++ b/packages/turf-nearest-neighbor-analysis/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-nearest-neighbor-analysis/tsconfig.build.json b/packages/turf-nearest-neighbor-analysis/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-nearest-neighbor-analysis/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-nearest-neighbor-analysis/tsconfig.json b/packages/turf-nearest-neighbor-analysis/tsconfig.json index 563bf86442..61a3a1adbd 100644 --- a/packages/turf-nearest-neighbor-analysis/tsconfig.json +++ b/packages/turf-nearest-neighbor-analysis/tsconfig.json @@ -1,3 +1,36 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-area" + }, + { + "path": "../turf-bbox" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-centroid" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-nearest-point" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-nearest-neighbor-analysis/tsup.config.ts b/packages/turf-nearest-neighbor-analysis/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-nearest-neighbor-analysis/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-nearest-point-on-line/package.json b/packages/turf-nearest-point-on-line/package.json index 7856d1b416..cd54c1bf42 100644 --- a/packages/turf-nearest-point-on-line/package.json +++ b/packages/turf-nearest-point-on-line/package.json @@ -45,11 +45,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/along": "workspace:*", diff --git a/packages/turf-nearest-point-on-line/tsconfig.build.json b/packages/turf-nearest-point-on-line/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-nearest-point-on-line/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-nearest-point-on-line/tsconfig.json b/packages/turf-nearest-point-on-line/tsconfig.json index 563bf86442..b223aa9e0a 100644 --- a/packages/turf-nearest-point-on-line/tsconfig.json +++ b/packages/turf-nearest-point-on-line/tsconfig.json @@ -1,3 +1,30 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-along" + }, + { + "path": "../turf-length" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-nearest-point-on-line/tsconfig.types.json b/packages/turf-nearest-point-on-line/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-nearest-point-on-line/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-nearest-point-on-line/tsup.config.ts b/packages/turf-nearest-point-on-line/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-nearest-point-on-line/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-nearest-point-to-line/package.json b/packages/turf-nearest-point-to-line/package.json index 8850e950be..fafe2f276c 100644 --- a/packages/turf-nearest-point-to-line/package.json +++ b/packages/turf-nearest-point-to-line/package.json @@ -49,11 +49,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/circle": "workspace:*", diff --git a/packages/turf-nearest-point-to-line/tsconfig.build.json b/packages/turf-nearest-point-to-line/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-nearest-point-to-line/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-nearest-point-to-line/tsconfig.json b/packages/turf-nearest-point-to-line/tsconfig.json index 563bf86442..a858aa5712 100644 --- a/packages/turf-nearest-point-to-line/tsconfig.json +++ b/packages/turf-nearest-point-to-line/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-point-to-line-distance" + }, + { + "path": "../turf-circle" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-nearest-point-to-line/tsconfig.types.json b/packages/turf-nearest-point-to-line/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-nearest-point-to-line/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-nearest-point-to-line/tsup.config.ts b/packages/turf-nearest-point-to-line/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-nearest-point-to-line/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-nearest-point/package.json b/packages/turf-nearest-point/package.json index 21ba53df29..b04a9d179a 100644 --- a/packages/turf-nearest-point/package.json +++ b/packages/turf-nearest-point/package.json @@ -47,11 +47,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-nearest-point/tsconfig.build.json b/packages/turf-nearest-point/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-nearest-point/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-nearest-point/tsconfig.json b/packages/turf-nearest-point/tsconfig.json index 563bf86442..2abe97bc71 100644 --- a/packages/turf-nearest-point/tsconfig.json +++ b/packages/turf-nearest-point/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clone" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-nearest-point/tsconfig.types.json b/packages/turf-nearest-point/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-nearest-point/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-nearest-point/tsup.config.ts b/packages/turf-nearest-point/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-nearest-point/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-planepoint/package.json b/packages/turf-planepoint/package.json index 186d929f2e..5f81ca6fca 100644 --- a/packages/turf-planepoint/package.json +++ b/packages/turf-planepoint/package.json @@ -46,11 +46,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-planepoint/tsconfig.build.json b/packages/turf-planepoint/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-planepoint/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-planepoint/tsconfig.json b/packages/turf-planepoint/tsconfig.json index 563bf86442..58c2e616b1 100644 --- a/packages/turf-planepoint/tsconfig.json +++ b/packages/turf-planepoint/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-planepoint/tsconfig.types.json b/packages/turf-planepoint/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-planepoint/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-planepoint/tsup.config.ts b/packages/turf-planepoint/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-planepoint/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-point-grid/package.json b/packages/turf-point-grid/package.json index 5115ed6caa..96170519a5 100644 --- a/packages/turf-point-grid/package.json +++ b/packages/turf-point-grid/package.json @@ -49,11 +49,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:*", diff --git a/packages/turf-point-grid/tsconfig.build.json b/packages/turf-point-grid/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-point-grid/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-point-grid/tsconfig.json b/packages/turf-point-grid/tsconfig.json index 563bf86442..aef941ee24 100644 --- a/packages/turf-point-grid/tsconfig.json +++ b/packages/turf-point-grid/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-within" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-point-grid/tsconfig.types.json b/packages/turf-point-grid/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-point-grid/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-point-grid/tsup.config.ts b/packages/turf-point-grid/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-point-grid/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-point-on-feature/package.json b/packages/turf-point-on-feature/package.json index b999348eec..149c1c4ccc 100644 --- a/packages/turf-point-on-feature/package.json +++ b/packages/turf-point-on-feature/package.json @@ -47,7 +47,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-point-on-feature/tsconfig.build.json b/packages/turf-point-on-feature/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-point-on-feature/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-point-on-feature/tsconfig.json b/packages/turf-point-on-feature/tsconfig.json index 563bf86442..72807c9ae3 100644 --- a/packages/turf-point-on-feature/tsconfig.json +++ b/packages/turf-point-on-feature/tsconfig.json @@ -1,3 +1,30 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-center" + }, + { + "path": "../turf-explode" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-nearest-point" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-point-on-feature/tsup.config.ts b/packages/turf-point-on-feature/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-point-on-feature/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-point-to-line-distance/package.json b/packages/turf-point-to-line-distance/package.json index e42cca08ae..45b3a26e1a 100644 --- a/packages/turf-point-to-line-distance/package.json +++ b/packages/turf-point-to-line-distance/package.json @@ -47,11 +47,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/circle": "workspace:*", diff --git a/packages/turf-point-to-line-distance/tsconfig.build.json b/packages/turf-point-to-line-distance/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-point-to-line-distance/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-point-to-line-distance/tsconfig.json b/packages/turf-point-to-line-distance/tsconfig.json index 563bf86442..4d23010744 100644 --- a/packages/turf-point-to-line-distance/tsconfig.json +++ b/packages/turf-point-to-line-distance/tsconfig.json @@ -1,3 +1,39 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bearing" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-nearest-point-on-line" + }, + { + "path": "../turf-projection" + }, + { + "path": "../turf-rhumb-bearing" + }, + { + "path": "../turf-rhumb-distance" + }, + { + "path": "../turf-circle" + } + ] } diff --git a/packages/turf-point-to-line-distance/tsconfig.types.json b/packages/turf-point-to-line-distance/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-point-to-line-distance/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-point-to-line-distance/tsup.config.ts b/packages/turf-point-to-line-distance/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-point-to-line-distance/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-point-to-polygon-distance/package.json b/packages/turf-point-to-polygon-distance/package.json index 713d751d6e..0b9f1ea2c3 100644 --- a/packages/turf-point-to-polygon-distance/package.json +++ b/packages/turf-point-to-polygon-distance/package.json @@ -49,7 +49,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-point-to-polygon-distance/tsconfig.build.json b/packages/turf-point-to-polygon-distance/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-point-to-polygon-distance/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-point-to-polygon-distance/tsconfig.json b/packages/turf-point-to-polygon-distance/tsconfig.json index 563bf86442..7b6e46df71 100644 --- a/packages/turf-point-to-polygon-distance/tsconfig.json +++ b/packages/turf-point-to-polygon-distance/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-point-to-line-distance" + }, + { + "path": "../turf-polygon-to-line" + } + ] } diff --git a/packages/turf-point-to-polygon-distance/tsup.config.ts b/packages/turf-point-to-polygon-distance/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-point-to-polygon-distance/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-points-within-polygon/package.json b/packages/turf-points-within-polygon/package.json index 6d7880a31e..919a4aed5a 100644 --- a/packages/turf-points-within-polygon/package.json +++ b/packages/turf-points-within-polygon/package.json @@ -46,11 +46,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-points-within-polygon/tsconfig.build.json b/packages/turf-points-within-polygon/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-points-within-polygon/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-points-within-polygon/tsconfig.json b/packages/turf-points-within-polygon/tsconfig.json index 563bf86442..ebc0eb2e61 100644 --- a/packages/turf-points-within-polygon/tsconfig.json +++ b/packages/turf-points-within-polygon/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-points-within-polygon/tsconfig.types.json b/packages/turf-points-within-polygon/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-points-within-polygon/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-points-within-polygon/tsup.config.ts b/packages/turf-points-within-polygon/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-points-within-polygon/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-polygon-smooth/package.json b/packages/turf-polygon-smooth/package.json index 9f033adc78..c167a7af38 100644 --- a/packages/turf-polygon-smooth/package.json +++ b/packages/turf-polygon-smooth/package.json @@ -47,11 +47,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-polygon-smooth/tsconfig.build.json b/packages/turf-polygon-smooth/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-polygon-smooth/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-polygon-smooth/tsconfig.json b/packages/turf-polygon-smooth/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-polygon-smooth/tsconfig.json +++ b/packages/turf-polygon-smooth/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-polygon-smooth/tsconfig.types.json b/packages/turf-polygon-smooth/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-polygon-smooth/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-polygon-smooth/tsup.config.ts b/packages/turf-polygon-smooth/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-polygon-smooth/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-polygon-tangents/package.json b/packages/turf-polygon-tangents/package.json index a4bc3351ff..74fe48da45 100644 --- a/packages/turf-polygon-tangents/package.json +++ b/packages/turf-polygon-tangents/package.json @@ -50,11 +50,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-polygon-tangents/tsconfig.build.json b/packages/turf-polygon-tangents/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-polygon-tangents/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-polygon-tangents/tsconfig.json b/packages/turf-polygon-tangents/tsconfig.json index 563bf86442..3b4751cb27 100644 --- a/packages/turf-polygon-tangents/tsconfig.json +++ b/packages/turf-polygon-tangents/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-boolean-within" + }, + { + "path": "../turf-explode" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-nearest-point" + } + ] } diff --git a/packages/turf-polygon-tangents/tsconfig.types.json b/packages/turf-polygon-tangents/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-polygon-tangents/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-polygon-tangents/tsup.config.ts b/packages/turf-polygon-tangents/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-polygon-tangents/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-polygon-to-line/package.json b/packages/turf-polygon-to-line/package.json index 2e2a06ac04..5ffaa8f23a 100644 --- a/packages/turf-polygon-to-line/package.json +++ b/packages/turf-polygon-to-line/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-polygon-to-line/tsconfig.build.json b/packages/turf-polygon-to-line/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-polygon-to-line/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-polygon-to-line/tsconfig.json b/packages/turf-polygon-to-line/tsconfig.json index 563bf86442..58c2e616b1 100644 --- a/packages/turf-polygon-to-line/tsconfig.json +++ b/packages/turf-polygon-to-line/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-polygon-to-line/tsup.config.ts b/packages/turf-polygon-to-line/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-polygon-to-line/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-polygonize/package.json b/packages/turf-polygonize/package.json index 03c32d0186..fbdde0c9a0 100644 --- a/packages/turf-polygonize/package.json +++ b/packages/turf-polygonize/package.json @@ -49,11 +49,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-polygonize/tsconfig.build.json b/packages/turf-polygonize/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-polygonize/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-polygonize/tsconfig.json b/packages/turf-polygonize/tsconfig.json index 563bf86442..583c56bf13 100644 --- a/packages/turf-polygonize/tsconfig.json +++ b/packages/turf-polygonize/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-envelope" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-polygonize/tsconfig.types.json b/packages/turf-polygonize/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-polygonize/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-polygonize/tsup.config.ts b/packages/turf-polygonize/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-polygonize/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-projection/package.json b/packages/turf-projection/package.json index 161a381e97..b2532e67fb 100644 --- a/packages/turf-projection/package.json +++ b/packages/turf-projection/package.json @@ -57,11 +57,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-projection/tsconfig.build.json b/packages/turf-projection/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-projection/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-projection/tsconfig.json b/packages/turf-projection/tsconfig.json index 563bf86442..ad3ba37848 100644 --- a/packages/turf-projection/tsconfig.json +++ b/packages/turf-projection/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-projection/tsconfig.types.json b/packages/turf-projection/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-projection/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-projection/tsup.config.ts b/packages/turf-projection/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-projection/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-quadrat-analysis/package.json b/packages/turf-quadrat-analysis/package.json index 22e94aee1a..ade0cf0d2e 100644 --- a/packages/turf-quadrat-analysis/package.json +++ b/packages/turf-quadrat-analysis/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-quadrat-analysis/tsconfig.build.json b/packages/turf-quadrat-analysis/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-quadrat-analysis/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-quadrat-analysis/tsconfig.json b/packages/turf-quadrat-analysis/tsconfig.json index 563bf86442..388cad8780 100644 --- a/packages/turf-quadrat-analysis/tsconfig.json +++ b/packages/turf-quadrat-analysis/tsconfig.json @@ -1,3 +1,39 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-area" + }, + { + "path": "../turf-bbox" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-centroid" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-point-grid" + }, + { + "path": "../turf-random" + }, + { + "path": "../turf-square-grid" + }, + { + "path": "../turf-nearest-neighbor-analysis" + } + ] } diff --git a/packages/turf-quadrat-analysis/tsup.config.ts b/packages/turf-quadrat-analysis/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-quadrat-analysis/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-random/package.json b/packages/turf-random/package.json index f3d51e4d9d..ee8c8b5d19 100644 --- a/packages/turf-random/package.json +++ b/packages/turf-random/package.json @@ -43,7 +43,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-random/tsconfig.build.json b/packages/turf-random/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-random/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-random/tsconfig.json b/packages/turf-random/tsconfig.json index 563bf86442..d777551892 100644 --- a/packages/turf-random/tsconfig.json +++ b/packages/turf-random/tsconfig.json @@ -1,3 +1,12 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-random/tsup.config.ts b/packages/turf-random/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-random/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-rectangle-grid/package.json b/packages/turf-rectangle-grid/package.json index 4d14fc4973..b81688e11e 100644 --- a/packages/turf-rectangle-grid/package.json +++ b/packages/turf-rectangle-grid/package.json @@ -49,7 +49,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-rectangle-grid/tsconfig.build.json b/packages/turf-rectangle-grid/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-rectangle-grid/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-rectangle-grid/tsconfig.json b/packages/turf-rectangle-grid/tsconfig.json index 563bf86442..1c96447a0e 100644 --- a/packages/turf-rectangle-grid/tsconfig.json +++ b/packages/turf-rectangle-grid/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-intersects" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-rectangle-grid/tsup.config.ts b/packages/turf-rectangle-grid/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-rectangle-grid/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-rewind/package.json b/packages/turf-rewind/package.json index e04babf947..949c3707bb 100644 --- a/packages/turf-rewind/package.json +++ b/packages/turf-rewind/package.json @@ -51,11 +51,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-rewind/tsconfig.build.json b/packages/turf-rewind/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-rewind/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-rewind/tsconfig.json b/packages/turf-rewind/tsconfig.json index 563bf86442..f7def694e2 100644 --- a/packages/turf-rewind/tsconfig.json +++ b/packages/turf-rewind/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-clockwise" + }, + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-rewind/tsconfig.types.json b/packages/turf-rewind/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-rewind/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-rewind/tsup.config.ts b/packages/turf-rewind/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-rewind/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-rhumb-bearing/package.json b/packages/turf-rhumb-bearing/package.json index 0e14aa6eb6..2630669ce1 100644 --- a/packages/turf-rhumb-bearing/package.json +++ b/packages/turf-rhumb-bearing/package.json @@ -51,7 +51,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-rhumb-bearing/tsconfig.build.json b/packages/turf-rhumb-bearing/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-rhumb-bearing/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-rhumb-bearing/tsconfig.json b/packages/turf-rhumb-bearing/tsconfig.json index 563bf86442..cbc8f9dd06 100644 --- a/packages/turf-rhumb-bearing/tsconfig.json +++ b/packages/turf-rhumb-bearing/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-destination" + } + ] } diff --git a/packages/turf-rhumb-bearing/tsup.config.ts b/packages/turf-rhumb-bearing/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-rhumb-bearing/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-rhumb-destination/package.json b/packages/turf-rhumb-destination/package.json index d023120238..3e78f4690a 100644 --- a/packages/turf-rhumb-destination/package.json +++ b/packages/turf-rhumb-destination/package.json @@ -55,7 +55,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-rhumb-destination/tsconfig.build.json b/packages/turf-rhumb-destination/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-rhumb-destination/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-rhumb-destination/tsconfig.json b/packages/turf-rhumb-destination/tsconfig.json index 563bf86442..fa5e53a52b 100644 --- a/packages/turf-rhumb-destination/tsconfig.json +++ b/packages/turf-rhumb-destination/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-rhumb-destination/tsup.config.ts b/packages/turf-rhumb-destination/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-rhumb-destination/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-rhumb-distance/package.json b/packages/turf-rhumb-distance/package.json index 147b439e38..45f55c20ef 100644 --- a/packages/turf-rhumb-distance/package.json +++ b/packages/turf-rhumb-distance/package.json @@ -53,7 +53,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-rhumb-distance/tsconfig.build.json b/packages/turf-rhumb-distance/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-rhumb-distance/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-rhumb-distance/tsconfig.json b/packages/turf-rhumb-distance/tsconfig.json index 563bf86442..ac0309702d 100644 --- a/packages/turf-rhumb-distance/tsconfig.json +++ b/packages/turf-rhumb-distance/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-distance" + } + ] } diff --git a/packages/turf-rhumb-distance/tsup.config.ts b/packages/turf-rhumb-distance/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-rhumb-distance/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-sample/package.json b/packages/turf-sample/package.json index a5ef3064f2..ac3e569113 100644 --- a/packages/turf-sample/package.json +++ b/packages/turf-sample/package.json @@ -45,7 +45,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-sample/tsconfig.build.json b/packages/turf-sample/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-sample/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-sample/tsconfig.json b/packages/turf-sample/tsconfig.json index 563bf86442..d777551892 100644 --- a/packages/turf-sample/tsconfig.json +++ b/packages/turf-sample/tsconfig.json @@ -1,3 +1,12 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-sample/tsup.config.ts b/packages/turf-sample/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-sample/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-sector/package.json b/packages/turf-sector/package.json index e22b771a56..63b087c716 100644 --- a/packages/turf-sector/package.json +++ b/packages/turf-sector/package.json @@ -43,11 +43,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-sector/tsconfig.build.json b/packages/turf-sector/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-sector/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-sector/tsconfig.json b/packages/turf-sector/tsconfig.json index 563bf86442..0de1110f36 100644 --- a/packages/turf-sector/tsconfig.json +++ b/packages/turf-sector/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-circle" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-line-arc" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-sector/tsconfig.types.json b/packages/turf-sector/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-sector/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-sector/tsup.config.ts b/packages/turf-sector/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-sector/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-shortest-path/package.json b/packages/turf-shortest-path/package.json index dc00ce8bf5..65e772fe7d 100644 --- a/packages/turf-shortest-path/package.json +++ b/packages/turf-shortest-path/package.json @@ -49,11 +49,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-shortest-path/tsconfig.build.json b/packages/turf-shortest-path/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-shortest-path/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-shortest-path/tsconfig.json b/packages/turf-shortest-path/tsconfig.json index 563bf86442..05aef290fc 100644 --- a/packages/turf-shortest-path/tsconfig.json +++ b/packages/turf-shortest-path/tsconfig.json @@ -1,3 +1,39 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-clean-coords" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-transform-scale" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-shortest-path/tsconfig.types.json b/packages/turf-shortest-path/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-shortest-path/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-shortest-path/tsup.config.ts b/packages/turf-shortest-path/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-shortest-path/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-simplify/package.json b/packages/turf-simplify/package.json index 1b00801f62..d364354581 100644 --- a/packages/turf-simplify/package.json +++ b/packages/turf-simplify/package.json @@ -51,11 +51,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-simplify/tsconfig.build.json b/packages/turf-simplify/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-simplify/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-simplify/tsconfig.json b/packages/turf-simplify/tsconfig.json index 563bf86442..5d483c09d4 100644 --- a/packages/turf-simplify/tsconfig.json +++ b/packages/turf-simplify/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clean-coords" + }, + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-simplify/tsconfig.types.json b/packages/turf-simplify/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-simplify/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-simplify/tsup.config.ts b/packages/turf-simplify/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-simplify/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-square-grid/package.json b/packages/turf-square-grid/package.json index f7ed3cacd4..f55be54a40 100644 --- a/packages/turf-square-grid/package.json +++ b/packages/turf-square-grid/package.json @@ -46,7 +46,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-square-grid/tsconfig.build.json b/packages/turf-square-grid/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-square-grid/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-square-grid/tsconfig.json b/packages/turf-square-grid/tsconfig.json index 563bf86442..f2120419ac 100644 --- a/packages/turf-square-grid/tsconfig.json +++ b/packages/turf-square-grid/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-rectangle-grid" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-square-grid/tsup.config.ts b/packages/turf-square-grid/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-square-grid/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-square/package.json b/packages/turf-square/package.json index 1cac04f9e4..af31f0f713 100644 --- a/packages/turf-square/package.json +++ b/packages/turf-square/package.json @@ -45,7 +45,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-square/tsconfig.build.json b/packages/turf-square/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-square/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-square/tsconfig.json b/packages/turf-square/tsconfig.json index 563bf86442..e0899aa687 100644 --- a/packages/turf-square/tsconfig.json +++ b/packages/turf-square/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-square/tsup.config.ts b/packages/turf-square/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-square/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-standard-deviational-ellipse/package.json b/packages/turf-standard-deviational-ellipse/package.json index 985106d1b9..eadf39b038 100644 --- a/packages/turf-standard-deviational-ellipse/package.json +++ b/packages/turf-standard-deviational-ellipse/package.json @@ -48,11 +48,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/random": "workspace:*", diff --git a/packages/turf-standard-deviational-ellipse/tsconfig.build.json b/packages/turf-standard-deviational-ellipse/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-standard-deviational-ellipse/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-standard-deviational-ellipse/tsconfig.json b/packages/turf-standard-deviational-ellipse/tsconfig.json index 563bf86442..cb6f2684b4 100644 --- a/packages/turf-standard-deviational-ellipse/tsconfig.json +++ b/packages/turf-standard-deviational-ellipse/tsconfig.json @@ -1,3 +1,33 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-center-mean" + }, + { + "path": "../turf-ellipse" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-points-within-polygon" + }, + { + "path": "../turf-random" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-standard-deviational-ellipse/tsconfig.types.json b/packages/turf-standard-deviational-ellipse/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-standard-deviational-ellipse/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-standard-deviational-ellipse/tsup.config.ts b/packages/turf-standard-deviational-ellipse/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-standard-deviational-ellipse/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-tag/package.json b/packages/turf-tag/package.json index 9c2a5624ae..13fdc2454c 100644 --- a/packages/turf-tag/package.json +++ b/packages/turf-tag/package.json @@ -49,7 +49,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-tag/tsconfig.build.json b/packages/turf-tag/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-tag/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-tag/tsconfig.json b/packages/turf-tag/tsconfig.json index 563bf86442..1ef9b4e830 100644 --- a/packages/turf-tag/tsconfig.json +++ b/packages/turf-tag/tsconfig.json @@ -1,3 +1,21 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-tag/tsup.config.ts b/packages/turf-tag/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-tag/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-tesselate/earcut.d.ts b/packages/turf-tesselate/earcut.d.ts deleted file mode 100644 index fab99ed18e..0000000000 --- a/packages/turf-tesselate/earcut.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module "earcut" { - declare function earcut( - vertices: number[], - holes: number[], - dimensions: number - ); - - export default earcut; -} diff --git a/packages/turf-tesselate/package.json b/packages/turf-tesselate/package.json index 1be431d79e..c278543218 100644 --- a/packages/turf-tesselate/package.json +++ b/packages/turf-tesselate/package.json @@ -53,13 +53,14 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" }, "devDependencies": { "@types/benchmark": "^2.1.5", + "@types/earcut": "^3.0.0", "@types/tape": "^5.8.1", "benchmark": "^2.1.4", "tape": "^5.9.0", diff --git a/packages/turf-tesselate/tsconfig.build.json b/packages/turf-tesselate/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-tesselate/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-tesselate/tsconfig.json b/packages/turf-tesselate/tsconfig.json index 563bf86442..d777551892 100644 --- a/packages/turf-tesselate/tsconfig.json +++ b/packages/turf-tesselate/tsconfig.json @@ -1,3 +1,12 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-tesselate/tsup.config.ts b/packages/turf-tesselate/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-tesselate/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-tin/package.json b/packages/turf-tin/package.json index 61871f06a6..ede894528e 100644 --- a/packages/turf-tin/package.json +++ b/packages/turf-tin/package.json @@ -44,11 +44,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-tin/tsconfig.build.json b/packages/turf-tin/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-tin/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-tin/tsconfig.json b/packages/turf-tin/tsconfig.json index 563bf86442..d777551892 100644 --- a/packages/turf-tin/tsconfig.json +++ b/packages/turf-tin/tsconfig.json @@ -1,3 +1,12 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + } + ] } diff --git a/packages/turf-tin/tsconfig.types.json b/packages/turf-tin/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-tin/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-tin/tsup.config.ts b/packages/turf-tin/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-tin/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-transform-rotate/package.json b/packages/turf-transform-rotate/package.json index d146a1b8ef..dcf9b8ecf0 100644 --- a/packages/turf-transform-rotate/package.json +++ b/packages/turf-transform-rotate/package.json @@ -49,11 +49,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-transform-rotate/tsconfig.build.json b/packages/turf-transform-rotate/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-transform-rotate/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-transform-rotate/tsconfig.json b/packages/turf-transform-rotate/tsconfig.json index 563bf86442..aaaf4f186f 100644 --- a/packages/turf-transform-rotate/tsconfig.json +++ b/packages/turf-transform-rotate/tsconfig.json @@ -1,3 +1,36 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-centroid" + }, + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-rhumb-bearing" + }, + { + "path": "../turf-rhumb-destination" + }, + { + "path": "../turf-rhumb-distance" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-transform-rotate/tsconfig.types.json b/packages/turf-transform-rotate/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-transform-rotate/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-transform-rotate/tsup.config.ts b/packages/turf-transform-rotate/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-transform-rotate/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-transform-scale/package.json b/packages/turf-transform-scale/package.json index 21015b2f18..6430aa0b93 100644 --- a/packages/turf-transform-scale/package.json +++ b/packages/turf-transform-scale/package.json @@ -53,11 +53,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:*", diff --git a/packages/turf-transform-scale/tsconfig.build.json b/packages/turf-transform-scale/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-transform-scale/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-transform-scale/tsconfig.json b/packages/turf-transform-scale/tsconfig.json index 563bf86442..628c4271e7 100644 --- a/packages/turf-transform-scale/tsconfig.json +++ b/packages/turf-transform-scale/tsconfig.json @@ -1,3 +1,48 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-bbox" + }, + { + "path": "../turf-center" + }, + { + "path": "../turf-centroid" + }, + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-rhumb-bearing" + }, + { + "path": "../turf-rhumb-destination" + }, + { + "path": "../turf-rhumb-distance" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-hex-grid" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-transform-scale/tsconfig.types.json b/packages/turf-transform-scale/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-transform-scale/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-transform-scale/tsup.config.ts b/packages/turf-transform-scale/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-transform-scale/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-transform-translate/package.json b/packages/turf-transform-translate/package.json index bf957b365f..e905318d71 100644 --- a/packages/turf-transform-translate/package.json +++ b/packages/turf-transform-translate/package.json @@ -51,11 +51,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/truncate": "workspace:*", diff --git a/packages/turf-transform-translate/tsconfig.build.json b/packages/turf-transform-translate/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-transform-translate/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-transform-translate/tsconfig.json b/packages/turf-transform-translate/tsconfig.json index 563bf86442..bfb3f17aba 100644 --- a/packages/turf-transform-translate/tsconfig.json +++ b/packages/turf-transform-translate/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-rhumb-destination" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-transform-translate/tsconfig.types.json b/packages/turf-transform-translate/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-transform-translate/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-transform-translate/tsup.config.ts b/packages/turf-transform-translate/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-transform-translate/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-triangle-grid/package.json b/packages/turf-triangle-grid/package.json index de2a9c5741..330c1f9e24 100644 --- a/packages/turf-triangle-grid/package.json +++ b/packages/turf-triangle-grid/package.json @@ -47,11 +47,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/bbox-polygon": "workspace:*", diff --git a/packages/turf-triangle-grid/tsconfig.build.json b/packages/turf-triangle-grid/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-triangle-grid/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-triangle-grid/tsconfig.json b/packages/turf-triangle-grid/tsconfig.json index 563bf86442..9d4c6682b3 100644 --- a/packages/turf-triangle-grid/tsconfig.json +++ b/packages/turf-triangle-grid/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-distance" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-intersect" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-truncate" + } + ] } diff --git a/packages/turf-triangle-grid/tsconfig.types.json b/packages/turf-triangle-grid/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-triangle-grid/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-triangle-grid/tsup.config.ts b/packages/turf-triangle-grid/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-triangle-grid/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-truncate/package.json b/packages/turf-truncate/package.json index 44782335f9..f0441036cc 100644 --- a/packages/turf-truncate/package.json +++ b/packages/turf-truncate/package.json @@ -48,11 +48,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-truncate/tsconfig.build.json b/packages/turf-truncate/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-truncate/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-truncate/tsconfig.json b/packages/turf-truncate/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-truncate/tsconfig.json +++ b/packages/turf-truncate/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-truncate/tsconfig.types.json b/packages/turf-truncate/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-truncate/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-truncate/tsup.config.ts b/packages/turf-truncate/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-truncate/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-union/package.json b/packages/turf-union/package.json index ca470742f2..b2c7dad36b 100644 --- a/packages/turf-union/package.json +++ b/packages/turf-union/package.json @@ -43,11 +43,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@types/benchmark": "^2.1.5", diff --git a/packages/turf-union/tsconfig.build.json b/packages/turf-union/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-union/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-union/tsconfig.json b/packages/turf-union/tsconfig.json index 563bf86442..cfaf2377ac 100644 --- a/packages/turf-union/tsconfig.json +++ b/packages/turf-union/tsconfig.json @@ -1,3 +1,15 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + } + ] } diff --git a/packages/turf-union/tsconfig.types.json b/packages/turf-union/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-union/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-union/tsup.config.ts b/packages/turf-union/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-union/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-unkink-polygon/package.json b/packages/turf-unkink-polygon/package.json index ea517e5233..c2d179402e 100644 --- a/packages/turf-unkink-polygon/package.json +++ b/packages/turf-unkink-polygon/package.json @@ -46,11 +46,11 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts", - "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts" + "test:types": "tsc --project tsconfig.types.json" }, "devDependencies": { "@turf/kinks": "workspace:*", diff --git a/packages/turf-unkink-polygon/tsconfig.build.json b/packages/turf-unkink-polygon/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-unkink-polygon/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-unkink-polygon/tsconfig.json b/packages/turf-unkink-polygon/tsconfig.json index 563bf86442..e2a97d4107 100644 --- a/packages/turf-unkink-polygon/tsconfig.json +++ b/packages/turf-unkink-polygon/tsconfig.json @@ -1,3 +1,24 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-area" + }, + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-kinks" + } + ] } diff --git a/packages/turf-unkink-polygon/tsconfig.types.json b/packages/turf-unkink-polygon/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/packages/turf-unkink-polygon/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/packages/turf-unkink-polygon/tsup.config.ts b/packages/turf-unkink-polygon/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-unkink-polygon/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf-voronoi/package.json b/packages/turf-voronoi/package.json index bacfc3b9b0..a9fc80c7fb 100644 --- a/packages/turf-voronoi/package.json +++ b/packages/turf-voronoi/package.json @@ -52,7 +52,7 @@ ], "scripts": { "bench": "tsx bench.ts", - "build": "tsup --config ../../tsup.config.ts", + "build": "tsup", "docs": "tsx ../../scripts/generate-readmes.ts", "test": "pnpm run /test:.*/", "test:tape": "tsx test.ts" diff --git a/packages/turf-voronoi/tsconfig.build.json b/packages/turf-voronoi/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/turf-voronoi/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/turf-voronoi/tsconfig.json b/packages/turf-voronoi/tsconfig.json index 563bf86442..0177652494 100644 --- a/packages/turf-voronoi/tsconfig.json +++ b/packages/turf-voronoi/tsconfig.json @@ -1,3 +1,18 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-clone" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-invariant" + } + ] } diff --git a/packages/turf-voronoi/tsup.config.ts b/packages/turf-voronoi/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf-voronoi/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/packages/turf/package.json b/packages/turf/package.json index 891c4d060f..7ba4475c14 100644 --- a/packages/turf/package.json +++ b/packages/turf/package.json @@ -67,10 +67,11 @@ "turf.min.js" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts && rollup -c rollup.config.js", + "build": "tsup", "last-checks": "pnpm run last-checks:testjs && pnpm run last-checks:example", "last-checks:example": "tsx test.example.js", "last-checks:testjs": "tsx test.ts", + "rollup": "rollup -c rollup.config.js", "test": "echo '@turf/turf tests run in the last-checks step'" }, "devDependencies": { diff --git a/packages/turf/tsconfig.build.json b/packages/turf/tsconfig.build.json new file mode 100644 index 0000000000..a505213468 --- /dev/null +++ b/packages/turf/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + }, +} diff --git a/packages/turf/tsconfig.json b/packages/turf/tsconfig.json index 563bf86442..4a6252a34a 100644 --- a/packages/turf/tsconfig.json +++ b/packages/turf/tsconfig.json @@ -1,3 +1,348 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "include": [ + "index.ts", + "lib/**/*.ts" + ], + "references": [ + { + "path": "../turf-along" + }, + { + "path": "../turf-angle" + }, + { + "path": "../turf-area" + }, + { + "path": "../turf-bbox" + }, + { + "path": "../turf-bbox-clip" + }, + { + "path": "../turf-bbox-polygon" + }, + { + "path": "../turf-bearing" + }, + { + "path": "../turf-bezier-spline" + }, + { + "path": "../turf-boolean-clockwise" + }, + { + "path": "../turf-boolean-concave" + }, + { + "path": "../turf-boolean-contains" + }, + { + "path": "../turf-boolean-crosses" + }, + { + "path": "../turf-boolean-disjoint" + }, + { + "path": "../turf-boolean-equal" + }, + { + "path": "../turf-boolean-intersects" + }, + { + "path": "../turf-boolean-overlap" + }, + { + "path": "../turf-boolean-parallel" + }, + { + "path": "../turf-boolean-point-in-polygon" + }, + { + "path": "../turf-boolean-point-on-line" + }, + { + "path": "../turf-boolean-touches" + }, + { + "path": "../turf-boolean-valid" + }, + { + "path": "../turf-boolean-within" + }, + { + "path": "../turf-buffer" + }, + { + "path": "../turf-center" + }, + { + "path": "../turf-center-mean" + }, + { + "path": "../turf-center-median" + }, + { + "path": "../turf-center-of-mass" + }, + { + "path": "../turf-centroid" + }, + { + "path": "../turf-circle" + }, + { + "path": "../turf-clean-coords" + }, + { + "path": "../turf-clone" + }, + { + "path": "../turf-clusters" + }, + { + "path": "../turf-clusters-dbscan" + }, + { + "path": "../turf-clusters-kmeans" + }, + { + "path": "../turf-collect" + }, + { + "path": "../turf-combine" + }, + { + "path": "../turf-concave" + }, + { + "path": "../turf-convex" + }, + { + "path": "../turf-destination" + }, + { + "path": "../turf-difference" + }, + { + "path": "../turf-dissolve" + }, + { + "path": "../turf-distance" + }, + { + "path": "../turf-distance-weight" + }, + { + "path": "../turf-ellipse" + }, + { + "path": "../turf-envelope" + }, + { + "path": "../turf-explode" + }, + { + "path": "../turf-flatten" + }, + { + "path": "../turf-flip" + }, + { + "path": "../turf-geojson-rbush" + }, + { + "path": "../turf-great-circle" + }, + { + "path": "../turf-helpers" + }, + { + "path": "../turf-hex-grid" + }, + { + "path": "../turf-interpolate" + }, + { + "path": "../turf-intersect" + }, + { + "path": "../turf-invariant" + }, + { + "path": "../turf-isobands" + }, + { + "path": "../turf-isolines" + }, + { + "path": "../turf-kinks" + }, + { + "path": "../turf-length" + }, + { + "path": "../turf-line-arc" + }, + { + "path": "../turf-line-chunk" + }, + { + "path": "../turf-line-intersect" + }, + { + "path": "../turf-line-offset" + }, + { + "path": "../turf-line-overlap" + }, + { + "path": "../turf-line-segment" + }, + { + "path": "../turf-line-slice" + }, + { + "path": "../turf-line-slice-along" + }, + { + "path": "../turf-line-split" + }, + { + "path": "../turf-line-to-polygon" + }, + { + "path": "../turf-mask" + }, + { + "path": "../turf-meta" + }, + { + "path": "../turf-midpoint" + }, + { + "path": "../turf-moran-index" + }, + { + "path": "../turf-nearest-neighbor-analysis" + }, + { + "path": "../turf-nearest-point" + }, + { + "path": "../turf-nearest-point-on-line" + }, + { + "path": "../turf-nearest-point-to-line" + }, + { + "path": "../turf-planepoint" + }, + { + "path": "../turf-point-grid" + }, + { + "path": "../turf-point-on-feature" + }, + { + "path": "../turf-point-to-line-distance" + }, + { + "path": "../turf-point-to-polygon-distance" + }, + { + "path": "../turf-points-within-polygon" + }, + { + "path": "../turf-polygon-smooth" + }, + { + "path": "../turf-polygon-tangents" + }, + { + "path": "../turf-polygon-to-line" + }, + { + "path": "../turf-polygonize" + }, + { + "path": "../turf-projection" + }, + { + "path": "../turf-quadrat-analysis" + }, + { + "path": "../turf-random" + }, + { + "path": "../turf-rectangle-grid" + }, + { + "path": "../turf-rewind" + }, + { + "path": "../turf-rhumb-bearing" + }, + { + "path": "../turf-rhumb-destination" + }, + { + "path": "../turf-rhumb-distance" + }, + { + "path": "../turf-sample" + }, + { + "path": "../turf-sector" + }, + { + "path": "../turf-shortest-path" + }, + { + "path": "../turf-simplify" + }, + { + "path": "../turf-square" + }, + { + "path": "../turf-square-grid" + }, + { + "path": "../turf-standard-deviational-ellipse" + }, + { + "path": "../turf-tag" + }, + { + "path": "../turf-tesselate" + }, + { + "path": "../turf-tin" + }, + { + "path": "../turf-transform-rotate" + }, + { + "path": "../turf-transform-scale" + }, + { + "path": "../turf-transform-translate" + }, + { + "path": "../turf-triangle-grid" + }, + { + "path": "../turf-truncate" + }, + { + "path": "../turf-union" + }, + { + "path": "../turf-unkink-polygon" + }, + { + "path": "../turf-voronoi" + } + ] } diff --git a/packages/turf/tsup.config.ts b/packages/turf/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/packages/turf/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d755e13c8c..0e87514dc0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5793,6 +5793,9 @@ importers: '@types/benchmark': specifier: ^2.1.5 version: 2.1.5 + '@types/earcut': + specifier: ^3.0.0 + version: 3.0.0 '@types/tape': specifier: ^5.8.1 version: 5.8.1 @@ -7763,6 +7766,9 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/earcut@3.0.0': + resolution: {integrity: sha512-k/9fOUGO39yd2sCjrbAJvGDEQvRwRnQIZlBz43roGwUZo5SHAmyVvSFyaVVZkicRVCaDXPKlbxrUcBuJoSWunQ==} + '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -13541,6 +13547,8 @@ snapshots: dependencies: '@types/ms': 0.7.34 + '@types/earcut@3.0.0': {} + '@types/estree@1.0.6': {} '@types/estree@1.0.7': {} diff --git a/templates/package-js/tsconfig.json b/templates/package-js/tsconfig.json new file mode 100644 index 0000000000..1d990af617 --- /dev/null +++ b/templates/package-js/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.shared.json", + "include": ["index.js"], + "compilerOptions": { + "composite": false, + "allowJs": true, + "checkJs": false, + "noEmit": true + } +} diff --git a/templates/package-js/tsup.config.ts b/templates/package-js/tsup.config.ts new file mode 100644 index 0000000000..86235185f6 --- /dev/null +++ b/templates/package-js/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.js"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/templates/package/tsconfig.build.json b/templates/package/tsconfig.build.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/templates/package/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/templates/package/tsconfig.json b/templates/package/tsconfig.json new file mode 100644 index 0000000000..8f3020c811 --- /dev/null +++ b/templates/package/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.shared.json", + "include": ["index.ts", "lib/**/*.ts"] +} diff --git a/templates/package/tsconfig.types.json b/templates/package/tsconfig.types.json new file mode 100644 index 0000000000..262fefbf0c --- /dev/null +++ b/templates/package/tsconfig.types.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false, + "noEmit": true, + }, + "include": ["types.ts"], +} diff --git a/templates/package/tsup.config.ts b/templates/package/tsup.config.ts new file mode 100644 index 0000000000..1111731f0e --- /dev/null +++ b/templates/package/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; +import { baseOptions } from "../../tsup.config"; + +export default [ + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/cjs", + format: "cjs", + }), + defineConfig({ + ...baseOptions, + entry: ["index.ts"], + outDir: "dist/esm", + format: "esm", + }), +]; diff --git a/tsconfig.shared.json b/tsconfig.shared.json index 81cb45d275..9ff4a415af 100644 --- a/tsconfig.shared.json +++ b/tsconfig.shared.json @@ -1,13 +1,141 @@ { "compilerOptions": { "target": "es2017", - "module": "node16", + "module": "esnext", "declaration": true, "esModuleInterop": true, "strict": true, - "moduleResolution": "node16", + "moduleResolution": "bundler", "importHelpers": true, "skipLibCheck": true, - "erasableSyntaxOnly": true - } + "erasableSyntaxOnly": true, + "composite": true, + "allowImportingTsExtensions": true, + "outDir": "dist", + "baseUrl": ".", + "paths": { + "@turf/along": ["packages/turf-along/index.ts"], + "@turf/angle": ["packages/turf-angle/index.ts"], + "@turf/area": ["packages/turf-area/index.ts"], + "@turf/bbox": ["packages/turf-bbox/index.ts"], + "@turf/bbox-clip": ["packages/turf-bbox-clip/index.ts"], + "@turf/bbox-polygon": ["packages/turf-bbox-polygon/index.ts"], + "@turf/bearing": ["packages/turf-bearing/index.ts"], + "@turf/bezier-spline": ["packages/turf-bezier-spline/index.ts"], + "@turf/boolean-clockwise": ["packages/turf-boolean-clockwise/index.ts"], + "@turf/boolean-concave": ["packages/turf-boolean-concave/index.ts"], + "@turf/boolean-contains": ["packages/turf-boolean-contains/index.ts"], + "@turf/boolean-crosses": ["packages/turf-boolean-crosses/index.ts"], + "@turf/boolean-disjoint": ["packages/turf-boolean-disjoint/index.ts"], + "@turf/boolean-equal": ["packages/turf-boolean-equal/index.ts"], + "@turf/boolean-intersects": ["packages/turf-boolean-intersects/index.ts"], + "@turf/boolean-overlap": ["packages/turf-boolean-overlap/index.ts"], + "@turf/boolean-parallel": ["packages/turf-boolean-parallel/index.ts"], + "@turf/boolean-point-in-polygon": [ + "packages/turf-boolean-point-in-polygon/index.ts", + ], + "@turf/boolean-point-on-line": ["packages/turf-boolean-point-on-line/index.ts"], + "@turf/boolean-touches": ["packages/turf-boolean-touches/index.ts"], + "@turf/boolean-valid": ["packages/turf-boolean-valid/index.ts"], + "@turf/boolean-within": ["packages/turf-boolean-within/index.ts"], + "@turf/buffer": ["packages/turf-buffer"], + "@turf/center": ["packages/turf-center/index.ts"], + "@turf/center-mean": ["packages/turf-center-mean/index.ts"], + "@turf/center-median": ["packages/turf-center-median/index.ts"], + "@turf/center-of-mass": ["packages/turf-center-of-mass/index.ts"], + "@turf/centroid": ["packages/turf-centroid/index.ts"], + "@turf/circle": ["packages/turf-circle/index.ts"], + "@turf/clean-coords": ["packages/turf-clean-coords/index.ts"], + "@turf/clone": ["packages/turf-clone/index.ts"], + "@turf/clusters": ["packages/turf-clusters/index.ts"], + "@turf/clusters-dbscan": ["packages/turf-clusters-dbscan/index.ts"], + "@turf/clusters-kmeans": ["packages/turf-clusters-kmeans/index.ts"], + "@turf/collect": ["packages/turf-collect/index.ts"], + "@turf/combine": ["packages/turf-combine/index.ts"], + "@turf/concave": ["packages/turf-concave/index.ts"], + "@turf/convex": ["packages/turf-convex/index.ts"], + "@turf/destination": ["packages/turf-destination/index.ts"], + "@turf/difference": ["packages/turf-difference/index.ts"], + "@turf/directional-mean": ["packages/turf-directional-mean/index.ts"], + "@turf/dissolve": ["packages/turf-dissolve/index.ts"], + "@turf/distance": ["packages/turf-distance/index.ts"], + "@turf/distance-weight": ["packages/turf-distance-weight/index.ts"], + "@turf/ellipse": ["packages/turf-ellipse/index.ts"], + "@turf/envelope": ["packages/turf-envelope/index.ts"], + "@turf/explode": ["packages/turf-explode/index.ts"], + "@turf/flatten": ["packages/turf-flatten/index.ts"], + "@turf/flip": ["packages/turf-flip/index.ts"], + "@turf/geojson-rbush": ["packages/turf-geojson-rbush"], + "@turf/great-circle": ["packages/turf-great-circle/index.ts"], + "@turf/helpers": ["packages/turf-helpers/index.ts"], + "@turf/hex-grid": ["packages/turf-hex-grid/index.ts"], + "@turf/interpolate": ["packages/turf-interpolate/index.ts"], + "@turf/intersect": ["packages/turf-intersect/index.ts"], + "@turf/invariant": ["packages/turf-invariant/index.ts"], + "@turf/isobands": ["packages/turf-isobands/index.ts"], + "@turf/isolines": ["packages/turf-isolines/index.ts"], + "@turf/kinks": ["packages/turf-kinks/index.ts"], + "@turf/length": ["packages/turf-length/index.ts"], + "@turf/line-arc": ["packages/turf-line-arc/index.ts"], + "@turf/line-chunk": ["packages/turf-line-chunk/index.ts"], + "@turf/line-intersect": ["packages/turf-line-intersect/index.ts"], + "@turf/line-offset": ["packages/turf-line-offset/index.ts"], + "@turf/line-overlap": ["packages/turf-line-overlap/index.ts"], + "@turf/line-segment": ["packages/turf-line-segment/index.ts"], + "@turf/line-slice": ["packages/turf-line-slice/index.ts"], + "@turf/line-slice-along": ["packages/turf-line-slice-along/index.ts"], + "@turf/line-split": ["packages/turf-line-split"], + "@turf/line-to-polygon": ["packages/turf-line-to-polygon/index.ts"], + "@turf/mask": ["packages/turf-mask/index.ts"], + "@turf/meta": ["packages/turf-meta"], + "@turf/midpoint": ["packages/turf-midpoint/index.ts"], + "@turf/moran-index": ["packages/turf-moran-index/index.ts"], + "@turf/nearest-neighbor-analysis": [ + "packages/turf-nearest-neighbor-analysis/index.ts", + ], + "@turf/nearest-point": ["packages/turf-nearest-point/index.ts"], + "@turf/nearest-point-on-line": ["packages/turf-nearest-point-on-line/index.ts"], + "@turf/nearest-point-to-line": ["packages/turf-nearest-point-to-line/index.ts"], + "@turf/planepoint": ["packages/turf-planepoint/index.ts"], + "@turf/point-grid": ["packages/turf-point-grid/index.ts"], + "@turf/point-on-feature": ["packages/turf-point-on-feature/index.ts"], + "@turf/point-to-line-distance": ["packages/turf-point-to-line-distance/index.ts"], + "@turf/point-to-polygon-distance": [ + "packages/turf-point-to-polygon-distance/index.ts", + ], + "@turf/points-within-polygon": ["packages/turf-points-within-polygon/index.ts"], + "@turf/polygon-smooth": ["packages/turf-polygon-smooth/index.ts"], + "@turf/polygon-tangents": ["packages/turf-polygon-tangents/index.ts"], + "@turf/polygon-to-line": ["packages/turf-polygon-to-line/index.ts"], + "@turf/polygonize": ["packages/turf-polygonize/index.ts"], + "@turf/projection": ["packages/turf-projection/index.ts"], + "@turf/quadrat-analysis": ["packages/turf-quadrat-analysis/index.ts"], + "@turf/random": ["packages/turf-random/index.ts"], + "@turf/rectangle-grid": ["packages/turf-rectangle-grid/index.ts"], + "@turf/rewind": ["packages/turf-rewind/index.ts"], + "@turf/rhumb-bearing": ["packages/turf-rhumb-bearing/index.ts"], + "@turf/rhumb-destination": ["packages/turf-rhumb-destination/index.ts"], + "@turf/rhumb-distance": ["packages/turf-rhumb-distance/index.ts"], + "@turf/sample": ["packages/turf-sample/index.ts"], + "@turf/sector": ["packages/turf-sector/index.ts"], + "@turf/shortest-path": ["packages/turf-shortest-path/index.ts"], + "@turf/simplify": ["packages/turf-simplify/index.ts"], + "@turf/square": ["packages/turf-square/index.ts"], + "@turf/square-grid": ["packages/turf-square-grid/index.ts"], + "@turf/standard-deviational-ellipse": [ + "packages/turf-standard-deviational-ellipse/index.ts", + ], + "@turf/tag": ["packages/turf-tag/index.ts"], + "@turf/tesselate": ["packages/turf-tesselate/index.ts"], + "@turf/tin": ["packages/turf-tin/index.ts"], + "@turf/transform-rotate": ["packages/turf-transform-rotate/index.ts"], + "@turf/transform-scale": ["packages/turf-transform-scale/index.ts"], + "@turf/transform-translate": ["packages/turf-transform-translate/index.ts"], + "@turf/triangle-grid": ["packages/turf-triangle-grid/index.ts"], + "@turf/truncate": ["packages/turf-truncate/index.js"], + "@turf/union": ["packages/turf-union/index.ts"], + "@turf/unkink-polygon": ["packages/turf-unkink-polygon/index.ts"], + "@turf/voronoi": ["packages/turf-voronoi/index.ts"], + }, + }, } diff --git a/tsup.config.ts b/tsup.config.ts index 283f087732..7d31276135 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,28 +1,17 @@ -import { defineConfig, type Options } from "tsup"; +import { type Options } from "tsup"; const baseOptions: Options = { + tsconfig: "./tsconfig.build.json", clean: true, dts: true, - entry: ["index.?s"], // while we have a mix of TS and JS packages - minify: false, - skipNodeModulesBundle: true, sourcemap: true, - target: "es2017", - tsconfig: "./tsconfig.json", // treeshake: true, causes "chunk.default" warning, breaks CJS exports? + minify: false, cjsInterop: true, splitting: true, + external: [ + /^@turf\//, // Externalize all @turf workspace packages + ], }; -export default [ - defineConfig({ - ...baseOptions, - outDir: "dist/cjs", - format: "cjs", - }), - defineConfig({ - ...baseOptions, - outDir: "dist/esm", - format: "esm", - }), -]; +export { baseOptions };