voxes-nuxt-sdk
Advanced tools
Comparing version 1.0.0 to 1.0.1
30
index.ts
@@ -1,29 +0,29 @@ | ||
import { Module } from '@nuxt/types' | ||
import { MetaInfo } from 'vue-meta/types' | ||
import { Module } from "@nuxt/types"; | ||
import { MetaInfo } from "vue-meta/types"; | ||
const module: Module = function () { | ||
if (!this.options.voxes) { | ||
console.error('Voxes: Missing Voxes appKey in nuxt config') | ||
return | ||
console.error("Voxes: Missing Voxes appKey in nuxt config"); | ||
return; | ||
} | ||
const head = this.options.head as MetaInfo | ||
const SDK_URL = this.nuxt.options.publicRuntimeConfig.sdkUrl | ||
const head = this.options.head as MetaInfo; | ||
const SDK_URL = | ||
this.nuxt.options.publicRuntimeConfig.sdkUrl || "https://voxes.io/sdk.js"; | ||
const script = { | ||
id: 'voxessdk', | ||
hid: 'voxessdk', | ||
id: "voxessdk", | ||
hid: "voxessdk", | ||
src: `${SDK_URL}?appKey=${this.options.voxes.appKey}`, | ||
async: true, | ||
} | ||
}; | ||
if (head.script) { | ||
head.script.push(script) | ||
return | ||
head.script.push(script); | ||
return; | ||
} | ||
head.script = [script] | ||
} | ||
head.script = [script]; | ||
}; | ||
export default module | ||
export default module; |
{ | ||
"name": "voxes-nuxt-sdk", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Nuxt module with Voxes SDK", | ||
"keywords": [ | ||
"voxes", | ||
"sdk" | ||
], | ||
"main": "index.ts", | ||
@@ -6,0 +10,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
1409
3
23
1
23