Skip to content

Commit

Permalink
feat: support NUXT_TELEMETRY_DEBUG and NUXT_TELEMETRY_ENDPOINT
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya parsa committed May 22, 2020
1 parent b4261cc commit f57526f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 978 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"ci-info": "^2.0.0",
"consola": "^2.11.3",
"defu": "^2.0.4",
"destr": "^0.1.4",
"fs-extra": "^9.0.0",
"git-url-parse": "^11.1.2",
"is-docker": "^2.0.0",
Expand Down
5 changes: 3 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import destr from 'destr'
import { Module } from '@nuxt/types'
import { Telemetry } from './telemetry'
import { getStats } from './utils/build-stats'
import { Stats, Nuxt, TelemetryOptions } from './types'

export default <Module> function () {
const options: TelemetryOptions = {
endpoint: 'https://telemetry.nuxtjs.com',
debug: false,
endpoint: destr(process.env.NUXT_TELEMETRY_ENDPOINT) || 'https://telemetry.nuxtjs.com',
debug: destr(process.env.NUXT_TELEMETRY_DEBUG),
...this.options.telemetry
}

Expand Down
Loading

0 comments on commit f57526f

Please sign in to comment.