docker icon indicating copy to clipboard operation
docker copied to clipboard

nodejs port

Open missinglink opened this issue 5 years ago • 1 comments

This library is the first experience most developers have with Pelias 🚀 When I originally wrote it, I wasn't expecting it to be so popular and to become the default method of running Pelias. Also, a year on we've learned a lot more about how people use it and the issues that can arise.

This PR ports the bash scripts to nodejs for increased readability, editability and testability. Some benefits of having it in node:

  • everyone can edit it and contribute without worrying about what's supported in bash3
  • much more portable (even to Windows?)
  • no dependencies on shell commands and specific installations for Mac tools
  • one line install via npm i -g
  • ability to write tests
  • ability to extend the core with a module system if required
  • ability to perform more complex environmental checks for things like env/users/groups/paths

What's been ported:

  • [x] pelias compose
  • [x] pelias download (still requires some control-flow code to allow parallel downloads)
  • [x] pelias import
  • [ ] pelias elastic
  • [ ] pelias prepare
  • [ ] pelias system
  • [ ] pelias test

Other considerations:

  • [ ] easy upgrade from the bash version
  • [ ] no-op refactor so all the old command work the same
  • [ ] update any documentation/readme

I'm looking for support from the community to get this over the finish line!

missinglink avatar Feb 13 '20 13:02 missinglink

This is a really cool guide for creating good CLI apps https://clig.dev

missinglink avatar Mar 16 '21 04:03 missinglink