Borewit / music-metadata

Stream and file based music metadata parser for node. Supporting a wide range of audio and tag formats.
MIT License
868 stars 89 forks source link

build to a dist directory #2114

Closed bjornstar closed 8 hours ago

bjornstar commented 2 days ago

I find it difficult to work with .d.ts and .js files side by side with the .ts files. It also gets messy to have to maintain ignore lists and clean up all the files when linting.

If we build to a dist directory, we can avoid a quite a bit of work. The compiled .js & .d.ts files are all ignored by default and to do a clean build we just blow away the directory.

I also switched to using tsx instead of ts-node as I couldn't figure out the right incantations to get it to run mocha and doc-gen/gen

I wasn't sure if you wanted doc-gen in the build so I left it alone.

If you're happy with the style of the project as it is feel free to close!

coveralls commented 2 days ago

Coverage Status

coverage: 97.437% (+0.9%) from 96.525% when pulling 101aa2bc66c783cb6e87f63f594ac4879a127ca3 on bjornstar:make-a-dist-directory into 24a507ec5b56d391c71202c6481eaf2ffe16b703 on Borewit:master.

Borewit commented 12 hours ago

I am sorry @bjornstar , I am not going to approve the PR.

Over time, I went back and forward having the compiled output in a different target directory versus having the Typescript within the same directory l. The second option is what I believe the most conventional solution, and gave me fewer problems.

A separate folder for TypeScript, resulted in:

  1. Problems if Type definitions being in the wrong folder, those are part of the distribution
  2. I had issues with IDE understanding the different folders, resulting in compiled files locally and in the target folder, source mappings file issue

Last, but not least, I prefer to avoid to align all my projects to a different pattern without a very good reason

bjornstar commented 8 hours ago

I am sorry @bjornstar , I am not going to approve the PR.

I have went back and forward having the compiled output in a different target directory. Having the typescript within the same directory is what I believe the most conventional solution, and gave me fewer problems.

A desperate folder for TypeScript, result in:

  1. Problems if Type definitions being in the wrong folder, those are part of the distribution
  2. I had issues with IDE understanding the different folders, resulting in compiled files locally and in the target folder, source mappings file issue

Last, but not least, I prefer to avoid to align all my projects to a different pattern without a very good reason

No worries, it was mostly idle curiosity to see if you were interested in doing it.