FlamingTempura / bibtex-tidy

Cleaner and Formatter for BibTeX files
https://flamingtempura.github.io/bibtex-tidy/
MIT License
832 stars 63 forks source link

Fix --sort-fields CLI output #404

Closed TobiKattmann closed 1 year ago

TobiKattmann commented 1 year ago

Hi,

first of all thank you for this tool, really nice to quickly interactively test it before buying into it :+1:

The CLI output shows --sort_fields with an underscore where it has to be --sort-fields with a dash/minus, i.e. the command from the CLI wont work or to be more precise: error with Unknown option: --sort_fields

image

I searched the repo for --sort_fields, fixed the instance under ./src and ran npm run build.

I wanted to run the docker instructions locally but ran into a

 [ERROR] fetch is not defined [plugin google-font-loader]

during Step 11/17 : RUN npm run build (note it ran fine as a standalone command in the repo). I have absolutely no clue of the languages etc so I stopped trying to get it to run after 15min or so. I also only really found this very recent related github issue. I am on EndeavourOS with node --version = v19.8.1 in case

In the contributing guidelines it says one should run npm build which fails on my system

[tobi@tobiT480 bibtex-tidy]$ npm build
Unknown command: "build"

but npm run build works. So either that has to be changed or it is some version-dependent thing.

Let me know whether this PR is fine :)

FlamingTempura commented 1 year ago

Thanks for the fix and feedback on the build process.

The docker issue is due to the container using an old node version (v16) that does not support fetch. Fetch was introduced in v18. I'll update the docker file. Thanks for reporting it!

I'll also update the contributing docs, I think that was just a mistake when I was writing it up.