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

Commit 10f91e3

Browse files
authored
Merge pull request #49 from netlify/telemetry
add telemetry
2 parents 4d198b0 + a61ad55 commit 10f91e3

File tree

3 files changed

+49
-15
lines changed

3 files changed

+49
-15
lines changed

package-lock.json

Lines changed: 42 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "David Calavera @calavera",
66
"bugs": "https://github.com/netlify/netlify-dev-plugin/issues",
77
"dependencies": {
8-
"@netlify/cli-utils": "^1.0.0",
8+
"@netlify/cli-utils": "^1.0.1",
99
"@netlify/zip-it-and-ship-it": "^0.1.3",
1010
"@oclif/command": "^1",
1111
"@oclif/config": "^1",

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)