Skip to content

Commit

Permalink
feat: support bottender dev --inspect=HOST:PORT (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkbtf authored Mar 4, 2020
1 parent 50a9925 commit f94590c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/bottender/src/cli/providers/sh/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const dev = async (ctx: CliContext): Promise<void> => {
const argv = getSubArgs(ctx.argv, {
'--console': Boolean,
'--port': Number,
'--inspect': String,

// Aliases
'-c': '--console',
Expand All @@ -21,6 +22,7 @@ const dev = async (ctx: CliContext): Promise<void> => {

const isConsole = argv['--console'] || false;
const port = argv['--port'] || process.env.PORT || 5000;
const inspectionUrl = argv['--inspect'];

const config = getBottenderConfig();

Expand All @@ -36,6 +38,7 @@ const dev = async (ctx: CliContext): Promise<void> => {
// watch
nodemon(
[
inspectionUrl ? `--inspect=${inspectionUrl} -- ` : '',
isTypescript ? '--ext js,mjs,json,ts --ignore dist/ ' : '',
'--exec "',
isTypescript ? 'tsc && ' : '',
Expand Down

0 comments on commit f94590c

Please sign in to comment.