3.0.2 • Published 2 years ago

better-opn v3.0.2

Weekly downloads
1,756,369
License
MIT
Repository
github
Last release
2 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

qrifygtime-clihttp-server-chenschttp-server-g-chenscchensc-create-http-server@saaspe/componentspractice-static-servernetlify-clihu-servergatsby-cligatsby@everything-registry/sub-chunk-1229ai-serverzzx@skedulr/nebula-ui-library@aschmidt8/netlify-cli@ascorbic/gatsby@abdullahceylan/expo-cli@bigidea/cli@blkmarketco/components-library@bolt/build-tools@bycedric/some-cli-test@bolt/uikit-workshop@bonobolabs/gatsby@brimble/clireact-form-component-libraryrunning-codingsea-staticsec_server_wensequelcomponentserver-functionsense-hat-web-emuseek-depszzj-first-servievelo-cli-prototypexiangxiang-serverxiaobo-static-servexiaobotest1xiaobotest2xiaobotestsecondxiaochuan-server-wow@ima/clivrainy-serverviews-servertype-libarywagool-static-serverwangda-static-studywater-plant-umlwsy-static-serverxdlxyp-static-serverwodeliuwudabaonpmwodedabaonpmyuana-testyunfeng-serverzhenniubi-severvue2-pro-clitesting-storybooktuntuntutu-scabbardthis-my-bendilistthe-static-server-pkgtry222tj-static-serverwan-server-lineshainasmall-ve-twosvelte-component-libstj-static-serverstatic-gstatic-packagestatic-alinastrong-static-serverstatic-server-checkedpstatic-server-chendedingstatic-server-chendnestatic-server-csjstatic-server-davidstatic-server-david-functionstatic-server-david-fystatic-server-davidsstatic-server-functionstatic-server-kangweistatic-server-mstatic-server-modelstatic-server-mzystatic-server-openstatic-server-showstatic-server-twostatic-resource-configstatic-resource-serversstatic-resources-functionstatic-serve-basicstatic-server--tomstatic-server-wp1static-server-wxystatic-suoxiaoyu-staticstatic_sever_cyfshow_dir_ginserver-node-zzksilang-static-server
3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.0.0

5 years ago

1.0.0-rc.2

5 years ago

1.0.0-rc.1

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

6 years ago

0.1.0-rc.1

6 years ago