Skip to content

Commit

Permalink
switch to open (#102)
Browse files Browse the repository at this point in the history
opn is deprecated
  • Loading branch information
jamesgeorge007 authored and HcySunYang committed Aug 12, 2019
1 parent da7e25b commit bb307b6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/cli/lib/server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path'
import getPort from 'get-port'
import opn from 'opn'
import open from 'open'
import Log from 'log-horizon'
import { CliOptions } from '.'

Expand All @@ -19,6 +19,6 @@ export default async (config: CliOptions) => {
server.listen(port, config.host, () => {
const addr = `http://${config.host}:${port}/`
logger.success(`Server running at ${addr}`)
if (config.open) opn(addr)
if (config.open) open(addr)
})
}
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"joycon": "^2.2.3",
"log-horizon": "^0.1.2",
"marked": "^0.6.0",
"opn": "^5.4.0",
"open": "^6.4.0",
"prismjs": "^1.15.0",
"sao": "^0.22.17",
"serve-handler": "^5.0.7"
Expand Down
1 change: 0 additions & 1 deletion packages/declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ declare module 'chokidar'
declare module 'sao'
declare module 'inquirer'
declare module 'get-port'
declare module 'opn'
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4412,7 +4412,7 @@ is-windows@^1.0.2:

is-wsl@^1.1.0:
version "1.1.0"
resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=

isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
Expand Down Expand Up @@ -6199,10 +6199,10 @@ onetime@^2.0.0:
dependencies:
mimic-fn "^1.0.0"

opn@^5.4.0:
version "5.4.0"
resolved "https://registry.npmjs.org/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035"
integrity sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==
open@^6.4.0:
version "6.4.0"
resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9"
integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==
dependencies:
is-wsl "^1.1.0"

Expand Down

0 comments on commit bb307b6

Please sign in to comment.