From 097e23dde42613a0430f85c087dee9377f2e91af Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sat, 12 Mar 2022 14:02:05 +1100 Subject: Make basic conversion to typescript --- index.html | 2 +- package.json | 6 +- src/App.vue | 7 +- src/components/Tile.vue | 18 +- src/components/TileTree.vue | 47 ++-- src/env.d.ts | 7 + src/layout.js | 468 ---------------------------------------- src/layout.ts | 510 ++++++++++++++++++++++++++++++++++++++++++++ src/main.js | 5 - src/main.ts | 5 + tsconfig.json | 15 ++ vite.config.js | 2 +- 12 files changed, 582 insertions(+), 510 deletions(-) create mode 100644 src/env.d.ts delete mode 100644 src/layout.js create mode 100644 src/layout.ts delete mode 100644 src/main.js create mode 100644 src/main.ts create mode 100644 tsconfig.json diff --git a/index.html b/index.html index 3c63caf..c7f71b2 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,6 @@
- + diff --git a/package.json b/package.json index 95eeebb..b251046 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "description": "An interactive visualisation of the biological tree of life", "scripts": { "dev": "vite", - "build": "vite build", + "build": "vue-tsc --noEmit && vite build", "preview": "vite preview" }, "author": "Terry Truong", @@ -18,6 +18,8 @@ "autoprefixer": "^10.4.2", "postcss": "^8.4.7", "tailwindcss": "^3.0.23", - "vite": "^2.8.0" + "typescript": "^4.6.2", + "vite": "^2.8.0", + "vue-tsc": "^0.32.1" } } diff --git a/src/App.vue b/src/App.vue index 3e95082..cf6dd75 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,11 @@ -