Switch to npm workspaces
This commit is contained in:
parent
781192a21c
commit
f48e211812
2893
package-lock.json
generated
2893
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
|
@ -4,13 +4,18 @@
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"workspaces": [
|
||||||
|
"web"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rimraf ./dist ./public",
|
"clean": "rimraf ./dist ./public",
|
||||||
"build:server": "npm run clean && tsc",
|
"build:server": "npm run clean && tsc",
|
||||||
"build:web": "cd web && yarn run build",
|
"build:web": "npm run build -w web",
|
||||||
"build": "npm run build:server && npm run build:web",
|
"build": "npm run build:server && npm run build:web",
|
||||||
"start": "NODE_ENV=production node dist",
|
"start": "NODE_ENV=production node dist",
|
||||||
"dev": "nodemon --ext js,ts,mts,mjs,json,prisma --exec \"tsx src/index.ts\"",
|
"dev": "concurrently --kill-others \"npm run dev:server\" \"npm run dev:web\"",
|
||||||
|
"dev:server": "nodemon --ext js,ts,mts,mjs,json,prisma --exec \"tsx src/index.ts\"",
|
||||||
|
"dev:web": "npm run dev -w web",
|
||||||
"devLegacy": "NODE_OPTIONS=\"--loader ts-node/esm\" node ./src/index.ts"
|
"devLegacy": "NODE_OPTIONS=\"--loader ts-node/esm\" node ./src/index.ts"
|
||||||
},
|
},
|
||||||
"prisma": {
|
"prisma": {
|
||||||
|
@ -35,6 +40,7 @@
|
||||||
"@types/netmask": "^2.0.1",
|
"@types/netmask": "^2.0.1",
|
||||||
"body-parser": "^1.20.2",
|
"body-parser": "^1.20.2",
|
||||||
"bree": "^9.1.3",
|
"bree": "^9.1.3",
|
||||||
|
"concurrently": "^8.2.0",
|
||||||
"dotenv": "^16.1.4",
|
"dotenv": "^16.1.4",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"jsonwebtoken": "^9.0.0",
|
"jsonwebtoken": "^9.0.0",
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'
|
||||||
import { app } from './server.js'
|
import { app } from './server.js'
|
||||||
import Bree from 'bree'
|
import Bree from 'bree'
|
||||||
|
|
||||||
const PORT = process.env.PORT || 3000
|
const PORT = process.env.PORT || 8000
|
||||||
|
|
||||||
// Start server
|
// Start server
|
||||||
app.listen(PORT, () => {
|
app.listen(PORT, () => {
|
||||||
|
|
1
web/.gitignore
vendored
1
web/.gitignore
vendored
|
@ -2,6 +2,7 @@
|
||||||
node_modules
|
node_modules
|
||||||
/dist
|
/dist
|
||||||
|
|
||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env.local
|
.env.local
|
||||||
.env.*.local
|
.env.*.local
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# essentials
|
# default
|
||||||
|
|
||||||
## Project setup
|
## Project setup
|
||||||
|
|
||||||
|
@ -39,19 +39,6 @@ npm run build
|
||||||
pnpm build
|
pnpm build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Lints and fixes files
|
|
||||||
|
|
||||||
```
|
|
||||||
# yarn
|
|
||||||
yarn lint
|
|
||||||
|
|
||||||
# npm
|
|
||||||
npm run lint
|
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm lint
|
|
||||||
```
|
|
||||||
|
|
||||||
### Customize configuration
|
### Customize configuration
|
||||||
|
|
||||||
See [Configuration Reference](https://vitejs.dev/config/).
|
See [Configuration Reference](https://vitejs.dev/config/).
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Welcome to Vuetify 3</title>
|
<title>Vuetify 3</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
4803
web/package-lock.json
generated
Normal file
4803
web/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
|
@ -10,8 +9,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mdi/font": "7.0.96",
|
"@mdi/font": "7.0.96",
|
||||||
"core-js": "^3.29.0",
|
"pinia": "^2.0.23",
|
||||||
"pinia": "^2.0.0",
|
|
||||||
"roboto-fontface": "*",
|
"roboto-fontface": "*",
|
||||||
"vue": "^3.2.0",
|
"vue": "^3.2.0",
|
||||||
"vue-router": "^4.0.0",
|
"vue-router": "^4.0.0",
|
||||||
|
@ -22,11 +20,10 @@
|
||||||
"@babel/types": "^7.21.4",
|
"@babel/types": "^7.21.4",
|
||||||
"@types/node": "^18.15.0",
|
"@types/node": "^18.15.0",
|
||||||
"@types/webfontloader": "^1.6.35",
|
"@types/webfontloader": "^1.6.35",
|
||||||
"@vitejs/plugin-vue": "^3.0.3",
|
"@vitejs/plugin-vue": "^4.0.0",
|
||||||
"@vue/eslint-config-typescript": "^11.0.0",
|
"@vue/eslint-config-typescript": "^11.0.0",
|
||||||
"eslint": "^8.37.0",
|
"eslint": "^8.0.0",
|
||||||
"eslint-plugin-vue": "^9.3.0",
|
"eslint-plugin-vue": "^9.0.0",
|
||||||
"sass": "^1.60.0",
|
|
||||||
"typescript": "^5.0.0",
|
"typescript": "^5.0.0",
|
||||||
"vite": "^4.2.0",
|
"vite": "^4.2.0",
|
||||||
"vite-plugin-vuetify": "^1.0.0",
|
"vite-plugin-vuetify": "^1.0.0",
|
||||||
|
|
|
@ -1,19 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<v-app id="inspire">
|
<v-app>
|
||||||
<v-navigation-drawer v-model="drawer"> </v-navigation-drawer>
|
<v-main><RouterView /> </v-main>
|
||||||
|
|
||||||
<v-app-bar>
|
|
||||||
<v-app-bar-nav-icon @click="drawer = !drawer"></v-app-bar-nav-icon>
|
|
||||||
|
|
||||||
<v-toolbar-title>Application</v-toolbar-title>
|
|
||||||
</v-app-bar>
|
|
||||||
|
|
||||||
<v-main> <router-view /> </v-main>
|
|
||||||
</v-app>
|
</v-app>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script setup lang="ts"></script>
|
||||||
import { ref } from "vue";
|
|
||||||
|
|
||||||
const drawer = ref(true);
|
|
||||||
</script>
|
|
||||||
|
|
BIN
web/src/assets/logo.png
Normal file
BIN
web/src/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
6
web/src/assets/logo.svg
Normal file
6
web/src/assets/logo.svg
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M261.126 140.65L164.624 307.732L256.001 466L377.028 256.5L498.001 47H315.192L261.126 140.65Z" fill="#1697F6"/>
|
||||||
|
<path d="M135.027 256.5L141.365 267.518L231.64 111.178L268.731 47H256H14L135.027 256.5Z" fill="#AEDDFF"/>
|
||||||
|
<path d="M315.191 47C360.935 197.446 256 466 256 466L164.624 307.732L315.191 47Z" fill="#1867C0"/>
|
||||||
|
<path d="M268.731 47C76.0026 47 141.366 267.518 141.366 267.518L268.731 47Z" fill="#7BC6FF"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 526 B |
75
web/src/components/HelloWorld.vue
Normal file
75
web/src/components/HelloWorld.vue
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
<template>
|
||||||
|
<v-container class="fill-height">
|
||||||
|
<v-responsive class="align-center text-center fill-height">
|
||||||
|
<v-img height="300" src="@/assets/logo.svg" />
|
||||||
|
|
||||||
|
<div class="text-body-2 font-weight-light mb-n1">Welcome to</div>
|
||||||
|
|
||||||
|
<h1 class="text-h2 font-weight-bold">Vuetify</h1>
|
||||||
|
|
||||||
|
<div class="py-14" />
|
||||||
|
|
||||||
|
<v-row class="d-flex align-center justify-center">
|
||||||
|
<v-col cols="auto">
|
||||||
|
<v-btn
|
||||||
|
href="https://vuetifyjs.com/components/all/"
|
||||||
|
min-width="164"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
variant="text"
|
||||||
|
>
|
||||||
|
<v-icon
|
||||||
|
icon="mdi-view-dashboard"
|
||||||
|
size="large"
|
||||||
|
start
|
||||||
|
/>
|
||||||
|
|
||||||
|
Components
|
||||||
|
</v-btn>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col cols="auto">
|
||||||
|
<v-btn
|
||||||
|
color="primary"
|
||||||
|
href="https://vuetifyjs.com/introduction/why-vuetify/#feature-guides"
|
||||||
|
min-width="228"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
size="x-large"
|
||||||
|
target="_blank"
|
||||||
|
variant="flat"
|
||||||
|
>
|
||||||
|
<v-icon
|
||||||
|
icon="mdi-speedometer"
|
||||||
|
size="large"
|
||||||
|
start
|
||||||
|
/>
|
||||||
|
|
||||||
|
Get Started
|
||||||
|
</v-btn>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col cols="auto">
|
||||||
|
<v-btn
|
||||||
|
href="https://community.vuetifyjs.com/"
|
||||||
|
min-width="164"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
variant="text"
|
||||||
|
>
|
||||||
|
<v-icon
|
||||||
|
icon="mdi-account-group"
|
||||||
|
size="large"
|
||||||
|
start
|
||||||
|
/>
|
||||||
|
|
||||||
|
Community
|
||||||
|
</v-btn>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-responsive>
|
||||||
|
</v-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
//
|
||||||
|
</script>
|
9
web/src/layouts/default/Default.vue
Normal file
9
web/src/layouts/default/Default.vue
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<template>
|
||||||
|
<v-app>
|
||||||
|
<default-view />
|
||||||
|
</v-app>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import DefaultView from './View.vue'
|
||||||
|
</script>
|
19
web/src/layouts/default/View.vue
Normal file
19
web/src/layouts/default/View.vue
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<template>
|
||||||
|
<v-app id="inspire">
|
||||||
|
<v-navigation-drawer v-model="drawer"> </v-navigation-drawer>
|
||||||
|
|
||||||
|
<v-app-bar>
|
||||||
|
<v-app-bar-nav-icon @click="drawer = !drawer"></v-app-bar-nav-icon>
|
||||||
|
|
||||||
|
<v-toolbar-title>Application</v-toolbar-title>
|
||||||
|
</v-app-bar>
|
||||||
|
|
||||||
|
<v-main> <router-view /> </v-main>
|
||||||
|
</v-app>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
const drawer = ref(true);
|
||||||
|
</script>
|
|
@ -4,7 +4,7 @@
|
||||||
* webfontloader documentation: https://github.com/typekit/webfontloader
|
* webfontloader documentation: https://github.com/typekit/webfontloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export async function loadFonts () {
|
export async function loadFonts () {
|
||||||
const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
|
const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
|
||||||
|
|
||||||
webFontLoader.load({
|
webFontLoader.load({
|
||||||
|
|
|
@ -4,13 +4,25 @@ import { createRouter, createWebHistory } from "vue-router";
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
name: "Home",
|
component: () => import("@/layouts/default/Default.vue"),
|
||||||
component: () => import(/* webpackChunkName: "home" */ "@/views/Home.vue"),
|
children: [
|
||||||
},
|
{
|
||||||
{
|
path: "",
|
||||||
path: "/:pathMatch(.*)*",
|
name: "Home",
|
||||||
name: "NotFound",
|
// route level code-splitting
|
||||||
component: () => import(/* webpackChunkName: "home" */ "@/views/404.vue"),
|
// this generates a separate chunk (about.[hash].js) for this route
|
||||||
|
// which is lazy-loaded when the route is visited.
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "home" */ "@/views/Home.vue"),
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: "/:pathMatch(.*)*",
|
||||||
|
name: "NotFound",
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "notfound" */ "@/views/404.vue"),
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/**
|
|
||||||
* src/styles/settings.scss
|
|
||||||
*
|
|
||||||
* Configures SASS variables and Vuetify overwrites
|
|
||||||
*/
|
|
||||||
|
|
||||||
// https://vuetifyjs.com/features/sass-variables/`
|
|
||||||
// @use 'vuetify/settings' with (
|
|
||||||
// $color-pack: false
|
|
||||||
// );
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<h1>test</h1>
|
<div><h1>Home</h1></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup></script>
|
<script lang="ts" setup></script>
|
||||||
|
|
|
@ -1,31 +1,25 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"target": "esnext",
|
"target": "ESNext",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"module": "ESNext",
|
||||||
"composite": true,
|
"moduleResolution": "Node",
|
||||||
"module": "esnext",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"sourceMap": false,
|
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"lib": ["esnext", "dom"],
|
"lib": ["ESNext", "DOM"],
|
||||||
"types": [
|
"skipLibCheck": true,
|
||||||
"node",
|
"noEmit": true,
|
||||||
"vuetify"
|
|
||||||
],
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"]
|
"@/*": [
|
||||||
},
|
"src/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
||||||
"src/**/*.ts",
|
"references": [{ "path": "./tsconfig.node.json" }],
|
||||||
"src/**/*.d.ts",
|
"exclude": ["node_modules"]
|
||||||
"src/**/*.tsx",
|
|
||||||
"src/**/*.vue",
|
|
||||||
"vite.config.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +1,38 @@
|
||||||
// Plugins
|
// Plugins
|
||||||
import vue from "@vitejs/plugin-vue";
|
import vue from '@vitejs/plugin-vue'
|
||||||
import vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
|
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
||||||
|
|
||||||
// Utilities
|
// Utilities
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from 'vite'
|
||||||
import { fileURLToPath, URL } from "node:url";
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
build: {
|
|
||||||
outDir: "../public",
|
|
||||||
emptyOutDir: true,
|
|
||||||
},
|
|
||||||
plugins: [
|
plugins: [
|
||||||
vue({
|
vue({
|
||||||
template: { transformAssetUrls },
|
template: { transformAssetUrls }
|
||||||
}),
|
}),
|
||||||
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
|
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
|
||||||
vuetify({
|
vuetify({
|
||||||
autoImport: true,
|
autoImport: true,
|
||||||
styles: {
|
|
||||||
configFile: "src/styles/settings.scss",
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
define: { "process.env": {} },
|
define: { 'process.env': {} },
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
},
|
},
|
||||||
extensions: [".js", ".json", ".jsx", ".mjs", ".ts", ".tsx", ".vue"],
|
extensions: [
|
||||||
|
'.js',
|
||||||
|
'.json',
|
||||||
|
'.jsx',
|
||||||
|
'.mjs',
|
||||||
|
'.ts',
|
||||||
|
'.tsx',
|
||||||
|
'.vue',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
port: 3000,
|
port: 3000,
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
|
|
1614
web/yarn.lock
1614
web/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user