ftrackhq / ftrack-ts-schema-generator

Gets the schema from an ftrack instance and generates typescript interfaces for all the entity types in the instance.
Apache License 2.0
2 stars 1 forks source link

feat: build with esbuild and publish to NPM #5

Closed gismya closed 1 year ago

gismya commented 1 year ago

Changes

Adds a build pipeline with esbuild and sets up the NPM publish scripts.

Test

Does it build? Does it run? Will it publish?

gismya commented 1 year ago

A simpler setup and vite seemed more targeted toward browser modules. I made a branch where I did a vite integration as well if you prefer.

WaylonFtrack commented 1 year ago

There is also a rollup in between esbuild and vite.

gismya commented 1 year ago

Vite is using Rollup, so would probably be very similar. But it doesn't have the development server, so if we want to have a bundler setup similar to the other ones it probably makes more sense than Vite.

jimmycallin commented 1 year ago

fixed ftrack/api made some changes to make it output es modules - check it out :)

don't forget to add NODE_TLS_REJECT_UNAUTHORIZED=0 before your command if you try this out again.

gismya commented 1 year ago

I had a working version with es modules already, but I landed in that commonjs is still the default for node, despite my personal preference in the matter. But I'm also okay with going for es modules with this, and then we'll add commonjs if it's needed in the future.