diff --git a/package.json b/package.json index c63b380..c87dfff 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,13 @@ "version": "0.2.3", "scripts": { "dev": "vite", - "build": "vite build", + "build": "vue-tsc --noEmit && vite build", "rollup": "rollup -c" }, "devDependencies": { "@rollup/plugin-buble": "^0.21.3", "@rollup/plugin-replace": "^2.3.3", + "@types/three": "^0.127.1", "@vitejs/plugin-vue": "^1.2.1", "@vue/compiler-sfc": "^3.0.11", "cannon": "^0.6.2", @@ -25,8 +26,10 @@ "rollup-plugin-vue": "^6.0.0-beta.11", "stats.js": "0.17.0", "three": "^0.127", + "typescript": "^4.1.3", "vite": "^2.1.5", - "vue": "^3.0.11" + "vue": "^3.0.11", + "vue-tsc": "^0.0.15" }, "main": "build/trois.js", "module": "build/trois.module.js", diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..b1ffd42 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "esnext", + // this enables stricter inference for data properties on `this` + "strict": true, + "jsx": "preserve", + "moduleResolution": "node", + }, + "include": ["src"] +}