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

Commit 63c2e93

Browse files
authored
Merge pull request #85 from netlify/liveUpdate
Update telemetry
2 parents 3b129d2 + d1f9fe3 commit 63c2e93

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/commands/dev/exec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const execa = require("execa");
22
const Command = require("@netlify/cli-utils");
3+
const { track } = require("@netlify/cli-utils/src/utils/telemetry");
34

45
class ExecCommand extends Command {
56
async run() {
@@ -13,6 +14,10 @@ class ExecCommand extends Command {
1314
env: process.env,
1415
stdio: "inherit"
1516
});
17+
// Todo hoist this telemetry `command` to CLI hook
18+
track("command", {
19+
command: "dev:exec"
20+
});
1621
}
1722
}
1823

src/commands/dev/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ class DevCommand extends Command {
249249
// Todo hoist this telemetry `command` to CLI hook
250250
track("command", {
251251
command: "dev",
252-
projectType: settings.type || "custom"
252+
projectType: settings.type || "custom",
253+
live: flags.live || false
253254
});
254255

255256
const banner = chalk.bold(`Netlify dev server is now ready on ${url}`);

src/commands/functions/create.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const fetch = require("node-fetch");
1111
const cp = require("child_process");
1212
const { createAddon } = require("netlify/src/addons");
1313
const ora = require("ora");
14+
const { track } = require("@netlify/cli-utils/src/utils/telemetry");
1415

1516
const templatesDir = path.resolve(__dirname, "../../functions-templates");
1617

@@ -29,6 +30,10 @@ class FunctionsCreateCommand extends Command {
2930
} else {
3031
await scaffoldFromTemplate.call(this, flags, args, functionsDir);
3132
}
33+
track("command", {
34+
command: "functions:create",
35+
url: flags.url
36+
});
3237
}
3338
}
3439

0 commit comments

Comments
 (0)