meszaros-lajos-gyorgy / minimist-lite

parse argument options
Other
15 stars 3 forks source link

expose type definitions file and sourcemaps #14

Closed micalevisk closed 2 years ago

micalevisk commented 2 years ago

closes #13

micalevisk commented 2 years ago

@meszaros-lajos-gyorgy I notice that we don't have source maps, which can make things hard to debug. Is it on purpose (to make the bundle size smaller I guess)?

npm pack here with source maps outputs unpacked size: 34.6 kB
without them: unpacked size: 15.8 kB

meszaros-lajos-gyorgy commented 2 years ago

the new gitignore seems to be a bit too general for me, but at least once that's in the codebase it never-ever has to be touched again, so I can live with it. :)

About sourcemaps, esbuild was just recently introduced to the repo and I'm just learning on how it can be managed, but yes, we can add another config option to the command to produce sourcemaps too, it's just a matter of adding --sourcemap to the command. Could you add that to this PR too, please?

micalevisk commented 2 years ago

@meszaros-lajos-gyorgy done! I like the ideia of keeping the package size small. I'm not sure if could gain something by using esbuild as the size of sourcemap+bundle is bigger then having only the source code

I know that with esbuild we could publish both ESM and CJS

micalevisk commented 2 years ago

also, I don't think we need to track on git the generated file (index.js on root) on the repo. What do you think?

you just need to build & publish locally instead

meszaros-lajos-gyorgy commented 2 years ago

Good point, the generated index.js can be removed from git as it will always change whenever the sources change! Please open a ticket for the topic of CI/CD and we can continue the discussion there.

meszaros-lajos-gyorgy commented 2 years ago

We already have a ticket on that, if forgot... :D