Migracja na Vite

This commit is contained in:
2022-07-17 14:18:42 +02:00
parent 9e021fab6c
commit 8edaf91a7f
14 changed files with 482 additions and 25987 deletions
-18
View File
@@ -1,18 +0,0 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/typescript/recommended'
],
parserOptions: {
ecmaVersion: 2020
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
}
+15
View File
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="/favicon.ico">
<title>GeneraTOR TD2</title>
<meta name="description" content="Generator rozkazów pisemnych online">
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
+288 -19772
View File
File diff suppressed because it is too large Load Diff
+10 -23
View File
@@ -3,33 +3,20 @@
"version": "0.1.1", "version": "0.1.1",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "dev": "vite --port 8080",
"build": "vue-cli-service build", "build": "vue-tsc --noEmit && vite build",
"lint": "vue-cli-service lint" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"core-js": "^3.6.5",
"pinia": "^2.0.14", "pinia": "^2.0.14",
"vue": "^3.0.0", "vue": "^3.2.37",
"vue-class-component": "^8.0.0-0", "vue-router": "^4.0.0-0"
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.18.0", "@vitejs/plugin-vue": "^3.0.0",
"@typescript-eslint/parser": "^4.18.0", "sass": "^1.53.0",
"@vue/cli-plugin-babel": "^5.0.4", "typescript": "^4.7.4",
"@vue/cli-plugin-eslint": "^5.0.4", "vite": "^3.0.0",
"@vue/cli-plugin-router": "^5.0.4", "vue-tsc": "^0.38.4"
"@vue/cli-plugin-typescript": "^5.0.4",
"@vue/cli-plugin-vuex": "^5.0.4",
"@vue/cli-service": "^5.0.4",
"@vue/compiler-sfc": "^3.0.0",
"@vue/eslint-config-typescript": "^7.0.0",
"eslint": "^7.0.0",
"eslint-plugin-vue": "^7.0.0",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"typescript": "~4.1.5"
} }
} }
-17
View File
@@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
+6 -6
View File
@@ -1,7 +1,7 @@
<template> <template>
<div class="rozkaz"> <div class="rozkaz">
<OrderN @generate-message="generateMessage" v-if="orderType == 'N'" /> <OrderNVue @generate-message="generateMessage" v-if="orderType == 'N'" />
<OrderS v-if="orderType == 'S'" /> <OrderSVue v-if="orderType == 'S'" />
<section class="info"> <section class="info">
<table class="info-table"> <table class="info-table">
@@ -53,12 +53,12 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import OrderN from '@/components/OrderN.vue'; import { useStore } from '../store/store';
import OrderS from '@/components/OrderS.vue'; import OrderNVue from './OrderN.vue';
import { useStore } from '@/store/store'; import OrderSVue from './OrderS.vue';
export default defineComponent({ export default defineComponent({
components: { OrderN, OrderS }, components: { OrderNVue, OrderSVue },
data() { data() {
return { return {
+2 -2
View File
@@ -206,8 +206,8 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { useStore } from '@/store/store'; import { defineComponent } from 'vue';
import { defineComponent, watch } from 'vue'; import { useStore } from '../store/store';
export default defineComponent({ export default defineComponent({
emits: ['generateMessage'], emits: ['generateMessage'],
+1 -1
View File
@@ -87,8 +87,8 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { useStore } from '@/store/store';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { useStore } from '../store/store';
export default defineComponent({ export default defineComponent({
setup() { setup() {
+4 -5
View File
@@ -1,6 +1,6 @@
<template> <template>
<div class="home"> <div class="home">
<Order /> <OrderVue />
<div class="generated-message"> <div class="generated-message">
Wygenerowana wiadomość: Wygenerowana wiadomość:
@@ -12,11 +12,10 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import Order from '@/components/Order.vue'; import OrderVue from '../components/Order.vue';
import { useStore } from '@/store/store'; import { useStore } from '../store/store';
export default defineComponent({ export default defineComponent({
components: { Order }, components: { OrderVue },
setup() { setup() {
return { return {
+2 -1
View File
@@ -1,4 +1,5 @@
/* eslint-disable */ /// <reference types="vite/client" />
declare module '*.vue' { declare module '*.vue' {
import type { DefineComponent } from 'vue' import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any> const component: DefineComponent<{}, {}, any>
+11 -33
View File
@@ -1,40 +1,18 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "esnext", "target": "ESNext",
"module": "esnext", "useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"strict": true, "strict": true,
"jsx": "preserve", "jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true, "sourceMap": true,
"baseUrl": ".", "resolveJsonModule": true,
"types": [ "isolatedModules": true,
"webpack-env" "esModuleInterop": true,
], "lib": ["ESNext", "DOM"],
"paths": { "skipLibCheck": true
"@/*": [
"src/*"
]
}, },
"lib": [ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"esnext", "references": [{ "path": "./tsconfig.node.json" }]
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
} }
+9
View File
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
+6
View File
@@ -0,0 +1,6 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()]
})
+125 -6106
View File
File diff suppressed because it is too large Load Diff