From 21d5cef7c9fec9b20a02353b545c8afbeee73486 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Wed, 22 Nov 2023 17:29:29 -0500 Subject: [PATCH] bundling changes for 0.1 --- package.json | 12 +++++++++--- rollup.config.js | 7 ++++++- yarn.lock | 14 +++++++++++++- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e84ee4a..571fef9 100644 --- a/package.json +++ b/package.json @@ -15,17 +15,22 @@ "require": "./dist/geoarrow.cjs", "default": "./dist/geoarrow.es.mjs" }, - "repository": "https://github.com/geoarrow/geoarrow-js", + "repository": { + "type": "git", + "url": "git+https://github.com/geoarrow/geoarrow-js.git" + }, "author": "Kyle Barron ", "license": "MIT", "type": "module", "scripts": { "build": "rollup -c rollup.config.js", - "watch": "tsc --watch --declaration", + "clean": "rimraf dist", "fmt:check": "prettier './src/**/*.ts' --check", "fmt": "prettier './src/**/*.ts' --write", + "prepublishOnly": "yarn clean && yarn build", "test": "vitest run", - "typecheck": "tsc --build" + "typecheck": "tsc --build", + "watch": "tsc --watch --declaration" }, "files": [ "dist/", @@ -41,6 +46,7 @@ "@types/proj4": "^2", "apache-arrow": "^14", "prettier": "^3.1.0", + "rimraf": "^5.0.5", "rollup": "^4.1.5", "rollup-plugin-dts": "^6.1.0", "ts-node": "^10.9.1", diff --git a/rollup.config.js b/rollup.config.js index 4ee7a2f..472d414 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -4,6 +4,7 @@ import dts from "rollup-plugin-dts"; const input = "./src/index.ts"; const sourcemap = true; +const external = ["apache-arrow"]; export default [ { @@ -14,6 +15,7 @@ export default [ sourcemap, }, plugins: [typescript()], + external, }, { input, @@ -22,6 +24,7 @@ export default [ format: "es", }, plugins: [dts()], + external, }, { input, @@ -31,15 +34,17 @@ export default [ sourcemap, }, plugins: [typescript()], + external, }, { input, output: { file: "dist/geoarrow.umd.js", format: "umd", - name: "geoarrow", + name: "@geoarrow/geoarrow-js", sourcemap, }, plugins: [typescript(), terser()], + external, }, ]; diff --git a/yarn.lock b/yarn.lock index 7b09ea6..a9b16a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -227,6 +227,7 @@ __metadata: apache-arrow: "npm:^14" prettier: "npm:^3.1.0" proj4: "npm:^2.9.2" + rimraf: "npm:^5.0.5" rollup: "npm:^4.1.5" rollup-plugin-dts: "npm:^6.1.0" ts-node: "npm:^10.9.1" @@ -1256,7 +1257,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10": +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": version: 10.3.10 resolution: "glob@npm:10.3.10" dependencies: @@ -1896,6 +1897,17 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:^5.0.5": + version: 5.0.5 + resolution: "rimraf@npm:5.0.5" + dependencies: + glob: "npm:^10.3.7" + bin: + rimraf: dist/esm/bin.mjs + checksum: a612c7184f96258b7d1328c486b12ca7b60aa30e04229a08bbfa7e964486deb1e9a1b52d917809311bdc39a808a4055c0f950c0280fba194ba0a09e6f0d404f6 + languageName: node + linkType: hard + "rollup-plugin-dts@npm:^6.1.0": version: 6.1.0 resolution: "rollup-plugin-dts@npm:6.1.0"