Support for TypeScript Modules
This commit is contained in:
parent
21bd300632
commit
6193324e89
5 changed files with 63 additions and 5 deletions
6
index.js
6
index.js
|
@ -1,12 +1,12 @@
|
|||
import { initWideAngle } from "./src";
|
||||
import { initWideAngle } from "./dist";
|
||||
import { ref } from 'vue';
|
||||
|
||||
export default {
|
||||
install: async (app, options) => {
|
||||
const waaRef = ref()
|
||||
app.provide('waa', waaRef);
|
||||
app.provide('waa', waaRef);
|
||||
initWideAngle(options)
|
||||
.then(waa => {
|
||||
.then(waa => {
|
||||
waaRef.value = waa;
|
||||
console.debug("[WAA] Wide Angle Analytics instance available");
|
||||
})
|
||||
|
|
37
package-lock.json
generated
Normal file
37
package-lock.json
generated
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "wideangle-vuejs",
|
||||
"version": "0.0.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "wideangle-vuejs",
|
||||
"version": "0.0.3",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"typescript": "^5.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
|
||||
"integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.20"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
|
||||
"integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,6 +6,10 @@
|
|||
"repository": "github:inputobjects/wideangle-vuejs",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"clear": "rimraf dist",
|
||||
"rebuild": "npm run clear && npm run build",
|
||||
"prepublishOnly": "npm run rebuild"
|
||||
},
|
||||
"keywords": [
|
||||
"wide angle analytics",
|
||||
|
@ -16,5 +20,8 @@
|
|||
"vuejs plugin"
|
||||
],
|
||||
"author": "Wide Angle Analytics <developers@wideangle.co>",
|
||||
"license": "Apache-2.0"
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"typescript": "^5.0.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"dev": "vite --host 0.0.0.0",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
|
|
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"include": ["src/**/*"],
|
||||
"compilerOptions": {
|
||||
"target": "es2016",
|
||||
// "module": "commonjs",
|
||||
"declaration": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"allowJs": true,
|
||||
"outDir": "dist",
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue