Skip to content

Get the path to the current package works with npx and global installations.

Notifications You must be signed in to change notification settings

tobua/get-package-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-package-path

Get the path to the current package works with npx and global installations.

⚠️ Package is currently in test stage and actual API differs from description!

Usage

npm install get-package-path
import { getPackagePath } from 'get-package-path'

console.log(getPackagePath('my-package-name'))

Can also be used to locate other dependent packages.

Verification

To check if the package would work with your requirements you can directly try it out.

npx

npx --yes get-package-path

npm init would store the package in the same place as npx.

global

npm install -g get-package-path
get-package-path
# Prints path to package.
npm uninstall -g get-package-path

About

Get the path to the current package works with npx and global installations.

Resources

Stars

Watchers

Forks