yyz945947732 / open-npm-link

Open the npm link for the package

Home Page:https://www.npmjs.com/package/open-npm-link

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

open-npm-link

Open the npm link for the package

Version PRs Welcome GitHub license

This is meant to be used in command-line tools and scripts, not in the browser.

Install

npm install --save open-npm-link

Warning: This package is native ESM and no longer provides a CommonJS export. If your project uses CommonJS, you will have to convert to ESM or use the dynamic import() function. Please don't open issues for questions regarding CommonJS / ESM.

Usage

import open from 'open-npm-link';

// Opens the react npm link in the default browser.
await open('lodash');

// Opens the react npm link in the specified browser.
await open('lodash', 'chrome');

API

function(packageName?: string, browser?: string): string;

Supported browser

  • chrome - Web browser
  • firefox - Web browser
  • edge - Web browser
  • browser - Default web browser
  • browserPrivate - Default web browser in incognito mode

browser and browserPrivate only supports chrome, firefox, and edge.

Related

LICENSE

MIT


This project is created using generator-stupid.

About

Open the npm link for the package

https://www.npmjs.com/package/open-npm-link

License:MIT License


Languages

Language:TypeScript 100.0%