Closed eashuang closed 1 year ago
Hi, I have tried to use rollup + babel to generate bundled javascript code for distribution.
Description of changes:
build
tsc
dist
dist/es/index.js
esm
dist/js/index.js
cjs
dist/index.js
build:types
Generated artifacts
dist ├── es │ ├── index.js │ └── package.json ├── from-geojson │ ├── geofence-converter.d.ts │ └── index.d.ts ├── index.d.ts ├── index.js ├── js │ └── index.js └── to-geojson ├── device-position-converter.d.ts ├── geofence-converter.d.ts ├── index.d.ts ├── place-converter.d.ts ├── route-converter.d.ts └── utils.d.ts
Tests I have tested it only takes 2.5s on my machine to generate 3 bundles with rollup + babel. I have also tested following:
Please help review and feedbacks are appreciated :)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Hi, I have tried to use rollup + babel to generate bundled javascript code for distribution.
Description of changes:
build
target totsc
to generate type declarations todist
dist/es/index.js
: Javascript supportingesm
.dist/js/index.js
: Javascript supportingcjs
.dist/index.js
: Browser compatible Javascript.build
target instead ofbuild:types
Generated artifacts
Tests I have tested it only takes 2.5s on my machine to generate 3 bundles with rollup + babel. I have also tested following:
dist/index.js
, calling an exported function.Please help review and feedbacks are appreciated :)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.