Skip to content

Commit

Permalink
Don't open a site in a new tab if it's already open (#698)
Browse files Browse the repository at this point in the history
* Don't open a site in a new tab if it's already open

* Remove opn from dependencies
  • Loading branch information
artiebits authored and yangshun committed May 25, 2018
1 parent 454e3d3 commit 407636a
Show file tree
Hide file tree
Showing 4 changed files with 2,651 additions and 1,946 deletions.
4 changes: 2 additions & 2 deletions lib/start-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const tcpPortUsed = require('tcp-port-used');
// initial check that required files are present
const chalk = require('chalk');
const fs = require('fs');
const opn = require('opn');
const openBrowser = require('react-dev-utils/openBrowser');
const CWD = process.cwd();

if (!fs.existsSync(CWD + '/siteConfig.js')) {
Expand Down Expand Up @@ -65,7 +65,7 @@ function checkPort() {
server(port);
const host = `http://localhost:${port}`;
console.log('Docusaurus server started on port %d', port);
opn(host);
openBrowser(host);
}
})
.catch(function(ex) {
Expand Down
Loading

0 comments on commit 407636a

Please sign in to comment.