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": "",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"workspaces": [
|
||||
"web"
|
||||
],
|
||||
"scripts": {
|
||||
"clean": "rimraf ./dist ./public",
|
||||
"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",
|
||||
"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"
|
||||
},
|
||||
"prisma": {
|
||||
|
@ -35,6 +40,7 @@
|
|||
"@types/netmask": "^2.0.1",
|
||||
"body-parser": "^1.20.2",
|
||||
"bree": "^9.1.3",
|
||||
"concurrently": "^8.2.0",
|
||||
"dotenv": "^16.1.4",
|
||||
"express": "^4.18.2",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
|
|
|
@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'
|
|||
import { app } from './server.js'
|
||||
import Bree from 'bree'
|
||||
|
||||
const PORT = process.env.PORT || 3000
|
||||
const PORT = process.env.PORT || 8000
|
||||
|
||||
// Start server
|
||||
app.listen(PORT, () => {
|
||||
|
|
1
web/.gitignore
vendored
1
web/.gitignore
vendored
|
@ -2,6 +2,7 @@
|
|||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# essentials
|
||||
# default
|
||||
|
||||
## Project setup
|
||||
|
||||
|
@ -39,19 +39,6 @@ npm run build
|
|||
pnpm build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
|
||||
```
|
||||
# yarn
|
||||
yarn lint
|
||||
|
||||
# npm
|
||||
npm run lint
|
||||
|
||||
# pnpm
|
||||
pnpm lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
|
||||
See [Configuration Reference](https://vitejs.dev/config/).
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Welcome to Vuetify 3</title>
|
||||
<title>Vuetify 3</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
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",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
|
@ -10,8 +9,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@mdi/font": "7.0.96",
|
||||
"core-js": "^3.29.0",
|
||||
"pinia": "^2.0.0",
|
||||
"pinia": "^2.0.23",
|
||||
"roboto-fontface": "*",
|
||||
"vue": "^3.2.0",
|
||||
"vue-router": "^4.0.0",
|
||||
|
@ -22,11 +20,10 @@
|
|||
"@babel/types": "^7.21.4",
|
||||
"@types/node": "^18.15.0",
|
||||
"@types/webfontloader": "^1.6.35",
|
||||
"@vitejs/plugin-vue": "^3.0.3",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.0",
|
||||
"eslint": "^8.37.0",
|
||||
"eslint-plugin-vue": "^9.3.0",
|
||||
"sass": "^1.60.0",
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-plugin-vue": "^9.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"vite": "^4.2.0",
|
||||
"vite-plugin-vuetify": "^1.0.0",
|
||||
|
|
|
@ -1,19 +1,7 @@
|
|||
<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>
|
||||
<v-main><RouterView /> </v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
const drawer = ref(true);
|
||||
</script>
|
||||
<script setup lang="ts"></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
|
||||
*/
|
||||
|
||||
export async function loadFonts () {
|
||||
export async function loadFonts () {
|
||||
const webFontLoader = await import(/* webpackChunkName: "webfontloader" */'webfontloader')
|
||||
|
||||
webFontLoader.load({
|
||||
|
|
|
@ -4,13 +4,25 @@ import { createRouter, createWebHistory } from "vue-router";
|
|||
const routes = [
|
||||
{
|
||||
path: "/",
|
||||
component: () => import("@/layouts/default/Default.vue"),
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "Home",
|
||||
component: () => import(/* webpackChunkName: "home" */ "@/views/Home.vue"),
|
||||
// route level code-splitting
|
||||
// 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: "home" */ "@/views/404.vue"),
|
||||
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>
|
||||
<h1>test</h1>
|
||||
<div><h1>Home</h1></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
|
|
|
@ -1,31 +1,25 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"target": "esnext",
|
||||
"target": "ESNext",
|
||||
"useDefineForClassFields": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"composite": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"sourceMap": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": ["esnext", "dom"],
|
||||
"types": [
|
||||
"node",
|
||||
"vuetify"
|
||||
],
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"skipLibCheck": true,
|
||||
"noEmit": true,
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
},
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.d.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"vite.config.ts"
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
@ -1,37 +1,38 @@
|
|||
// Plugins
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
||||
|
||||
// Utilities
|
||||
import { defineConfig } from "vite";
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
import { defineConfig } from 'vite'
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
build: {
|
||||
outDir: "../public",
|
||||
emptyOutDir: true,
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
template: { transformAssetUrls },
|
||||
template: { transformAssetUrls }
|
||||
}),
|
||||
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
|
||||
vuetify({
|
||||
autoImport: true,
|
||||
styles: {
|
||||
configFile: "src/styles/settings.scss",
|
||||
},
|
||||
}),
|
||||
],
|
||||
define: { "process.env": {} },
|
||||
define: { 'process.env': {} },
|
||||
resolve: {
|
||||
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: {
|
||||
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