Get the current package's binary path (using the package.json bin field). This is useful when testing a package's binary. Using get-bin-path (as opposed to hard-coding the path to the binary). Validates that the package.json bin field is correctly setup. Decouples the binary path from the tests, which allows moving the file without rewriting the tests. This package is an ES module and must be loaded using an import or import() statement, not require(). Returns the current package's binary absolute path. When no package.json or binary can be found, undefined is returned instead.

Features

  • Get the current package's binary path
  • Validates that the package.json bin field is correctly setup
  • Decouples the binary path from the tests, which allows moving the file without rewriting the tests
  • API
  • Examples

Project Samples

Project Activity

See All Activity >

Categories

Package Managers

License

Apache License V2.0

Follow get-bin-path

get-bin-path Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of get-bin-path!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Package Managers

Registered

2022-08-24