3.0.2 • Published 4 years ago

better-opn v3.0.2

Weekly downloads
1,756,369
License
MIT
Repository
github
Last release
4 years ago

better-opn

A better opn. Reuse the same tab on Chrome for 👨‍💻. Inspire by create-react-app

Install

$ yarn add better-opn

$ npm install better-opn

Usage

If you wish to overwrite the default browser, override BROWSER environment variable to your desired browser name (name is platform dependent).

const opn = require('better-opn');

opn('http://localhost:3000');

Reuse tab by match host

In case your app can navigate to another pathnames and still want to reuse opened tab, set environment variable OPEN_MATCH_HOST_ONLY=true can tell this program to find reusable tab by only match the host part of your URL.

process.env.OPEN_MATCH_HOST_ONLY = 'true';

opn('http://localhost:3000/foo/bar'); // This will reuse any tab with URL starting with http://localhost:3000/

Author

@storybook/coreqrifygtime-clihttp-server-chenschttp-server-g-chenscchensc-create-http-server@saaspe/componentspractice-static-serverhu-server@everything-registry/sub-chunk-1229ai-server@wacoco/ywodedabaonpmwodeliuwudabaonpmwan-server-linewagool-static-serverxiangxiang-serverwsy-static-serverxiaobo-static-servexiaobotest1xiaobotest2xiaobotestsecondxiaochuan-server-wowxdlstatic-alinatesting-storybooksvelte-component-libthe-static-server-pkgthis-my-bendilistvrainy-servervelo-cli-prototype@bolt/uikit-workshop@blkmarketco/components-libraryjesh-calculationke-vejx-static-serverlarissa-static-serverlast-serveridong-servergoodsfilestoolshost-your-folderhnq-static-serverh5tj-static-serverguo-statiche-resource-serverheadless-page-watcherh-y-servergyj-dabaowenjianhwy-start-serverhy-server-hylilong-serverlilong-server2liuhejia-resources-serverliuyan-static-serverlogafterlucky-ststic-servermamihong-servermamba-servermanan-react-native-expo-authorize-netlovense-linklongfuniubility-static-serverlocal-dev-proxyliuziyan-static-serverlucky1983-serverladuolei-static-serverladuolei-static-server-akobe-server@wardpeet/gatsby@xiedacon/small-server@throttleup/gatsby@torchlabs/netlify-cli@unlighthouse/cli@vitali_shcherbina/styled-lib@xunhou/webpack@zalastax/nolb-betadbcactualplaid-cliall-people-sumalle-authasset-toolanni-serverappcharge-checkout@abdullahceylan/expo-cli@7hci/gatsby-pge@hahahoarder/strawberry-ui@adinsure-ops/ops-cli-auth-cjs-library@edwinpb/scany@codingdud/cooliconsanci-react@stoplion/ohstatic-resource-configstatic-server-functionstatic-server-kangweistatic-server-mstatic-server-modelstatic-server-mzystatic-server-openstatic-server-showstatic-server-twostatic-server-wp1
3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

6 years ago

1.0.0

6 years ago

1.0.0-rc.2

6 years ago

1.0.0-rc.1

6 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.1.0-rc.1

7 years ago