feat(init): all
This commit is contained in:
1
apps/demo/env.d.ts
vendored
Normal file
1
apps/demo/env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
12
apps/demo/index.html
Normal file
12
apps/demo/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
9
apps/demo/package.json
Normal file
9
apps/demo/package.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "@nanxing-admin/demo",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite"
|
||||
}
|
||||
}
|
||||
3
apps/demo/src/App.vue
Normal file
3
apps/demo/src/App.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>Demo</div>
|
||||
</template>
|
||||
1
apps/demo/src/assets/style/tailwind.css
Normal file
1
apps/demo/src/assets/style/tailwind.css
Normal file
@@ -0,0 +1 @@
|
||||
@import 'tailwindcss';
|
||||
9
apps/demo/src/main.ts
Normal file
9
apps/demo/src/main.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import './assets/style/tailwind.css';
|
||||
|
||||
import { createApp } from 'vue';
|
||||
import App from './App.vue';
|
||||
|
||||
import { createWebApp } from 'nanxing-admin';
|
||||
createWebApp();
|
||||
|
||||
createApp(App).mount('#app');
|
||||
9
apps/demo/tsconfig.json
Normal file
9
apps/demo/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.app.json",
|
||||
"include": ["env.d.ts", "src/**/*.vue", "src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"],
|
||||
"exclude": ["src/**/__test__", "node_modules", "dist"],
|
||||
"compilerOptions": {
|
||||
"types": ["node"],
|
||||
"allowSyntheticDefaultImports": true
|
||||
}
|
||||
}
|
||||
27
apps/demo/vite.config.ts
Normal file
27
apps/demo/vite.config.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
// base: 影响打包静态资源的路径
|
||||
base: './',
|
||||
plugins: [vue(), vueJsx(), tailwindcss()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
},
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: { api: 'modern-compiler' },
|
||||
},
|
||||
},
|
||||
server: {
|
||||
host: true,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user