From 9ffe504586892c72c8a98356a60fe43ab591f8de Mon Sep 17 00:00:00 2001 From: pvincent Date: Tue, 2 Mar 2021 23:16:56 +0400 Subject: [PATCH] tsconfig.json required --- .vscode/settings.json | 3 ++- vite.config.ts | 54 +++++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index aa5d60d..e008358 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ "vetur.validation.interpolation": true, "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", + "cSpell.enableFiletypes": ["markdown", "!typescript", "!json"], "cSpell.words": [ "Astrologia", @@ -16,5 +17,5 @@ "protovue", "tmik", "windi" -] + ] } diff --git a/vite.config.ts b/vite.config.ts index b43cbe6..bc8c043 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,40 +5,40 @@ import WindiCSS from 'vite-plugin-windicss' import { resolve } from "path" export default { - plugins: [ - vue(), - WindiCSS() - ], - define: { - APP_TITLE: JSON.stringify(pkg.name), - APP_VERSION: JSON.stringify(buildVersion()), - APP_REPOSITORY: JSON.stringify(pkg.repository), - APP_LICENSE: JSON.stringify(pkg.license), - }, - resolve: { - alias: { - "@": resolve(__dirname, "src"), - }, - }, + plugins: [ + vue(), + WindiCSS() + ], + define: { + APP_TITLE: JSON.stringify(pkg.name), + APP_VERSION: JSON.stringify(buildVersion()), + APP_REPOSITORY: JSON.stringify(pkg.repository), + APP_LICENSE: JSON.stringify(pkg.license), + }, + resolve: { + alias: { + "@": resolve(__dirname, "src"), + }, + }, } // FUNCTIONS //---------- function buildVersion(): string { - const version = pkg.version - if (!isGitCommand()) { - return version - } - const dirty = Number(execSync("git status -s | wc -l").toString()) - return dirty > 0 ? `${version}…${dirty}` : version + const version = pkg.version + if (!isGitCommand()) { + return version + } + const dirty = Number(execSync("git status -s | wc -l").toString()) + return dirty > 0 ? `${version}…${dirty}` : version } function isGitCommand(): boolean { - try { - execSync("command -v git") - return true - } catch (e) { - return false - } + try { + execSync("command -v git") + return true + } catch (e) { + return false + } } \ No newline at end of file