Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit 1141cb6

Browse files
committed
add telemetry
depends on netlify/cli-utils#5
1 parent 9a822ee commit 1141cb6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/commands/dev/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const { serverSettings } = require('../../detect-server')
99
const openBrowser = require('../../utils/openBrowser')
1010
const Command = require('@netlify/cli-utils')
1111
const { getAddons } = require('netlify/src/addons')
12+
const { track } = require('@netlify/cli-utils/src/utils/telemetry')
1213

1314
function cleanExit() {
1415
process.exit()
@@ -158,13 +159,18 @@ class DevCommand extends Command {
158159
}
159160
}
160161
startDevServer(settings, this.log, this.error)
162+
161163
if (functionsDir) {
162164
const fnSettings = await serveFunctions({ functionsDir })
163165
settings.functionsPort = fnSettings.port
164166
}
165167

166168
const url = await startProxy(settings, addonUrls)
167169
this.log(`Netlify dev server is now ready on ${url}`)
170+
// Todo hoist this telemetry `command` to CLI hook
171+
track('command', {
172+
command: 'dev'
173+
})
168174
openBrowser(url)
169175
}
170176
}

0 commit comments

Comments
 (0)