@citruslime/create-boilerplate 3.0.0-beta.2 → 3.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +7 -7
  2. package/main.js +353 -314
  3. package/package.json +3 -4
  4. package/template/README.md +4 -4
  5. package/template/_editorconfig +5 -0
  6. package/template/_gitattributes +5 -2
  7. package/template/_gitignore +6 -2
  8. package/template/_husky/post-checkout +4 -0
  9. package/template/_husky/post-merge +4 -0
  10. package/template/_husky/pre-commit +4 -0
  11. package/template/apps/app/_lintstagedrc.js +5 -0
  12. package/template/apps/app/_stylelint.config.js +4 -0
  13. package/template/apps/app/eslint.config.js +39 -0
  14. package/template/apps/app/index.html +17 -0
  15. package/template/apps/app/package.json +23 -0
  16. package/template/{src → apps/app/src}/app.vue +1 -7
  17. package/template/apps/app/src/components/.gitkeep +0 -0
  18. package/template/apps/app/src/main.css +6 -0
  19. package/template/apps/app/src/main.ts +17 -0
  20. package/template/{src/pages/dashboard/index.vue → apps/app/src/pages/dashboard.vue} +4 -6
  21. package/template/{src/router/index.ts → apps/app/src/router.ts} +12 -7
  22. package/template/apps/app/src/state/auth.ts +11 -0
  23. package/template/apps/app/src/utils/.gitkeep +0 -0
  24. package/template/{tsconfig.app.json → apps/app/tsconfig.app.json} +7 -9
  25. package/template/{tsconfig.json → apps/app/tsconfig.json} +1 -4
  26. package/template/apps/app/tsconfig.node.json +13 -0
  27. package/template/{vite.config.ts → apps/app/vite.config.ts} +57 -27
  28. package/template/package.json +11 -10
  29. package/template/packages/config-eslint/_lintstagedrc.js +4 -0
  30. package/template/packages/config-eslint/eslint.config.js +1 -0
  31. package/template/packages/config-eslint/package.json +10 -0
  32. package/template/packages/config-stylelint/_lintstagedrc.js +4 -0
  33. package/template/packages/config-stylelint/eslint.config.js +1 -0
  34. package/template/packages/config-stylelint/package.json +13 -0
  35. package/template/packages/config-typescript/node.json +17 -0
  36. package/template/packages/config-typescript/package.json +9 -0
  37. package/template/packages/config-typescript/vue.json +18 -0
  38. package/template/packages/utils/_lintstagedrc.js +4 -0
  39. package/template/packages/utils/eslint.config.js +1 -0
  40. package/template/packages/utils/exports-list.json +1 -0
  41. package/template/packages/utils/exports-list.ts +95 -0
  42. package/template/packages/utils/package.json +43 -0
  43. package/template/packages/utils/plugin.ts +55 -0
  44. package/template/packages/utils/resolver.ts +38 -0
  45. package/template/packages/utils/src/api/api.ts +6 -0
  46. package/template/packages/utils/src/api/endpoints.ts +18 -0
  47. package/template/packages/utils/src/api/errors.ts +19 -0
  48. package/template/packages/utils/src/api/models/app-info.ts +5 -0
  49. package/template/packages/utils/src/index.ts +2 -0
  50. package/template/packages/utils/tsconfig.build.json +19 -0
  51. package/template/packages/utils/tsconfig.json +11 -0
  52. package/template/packages/utils/tsconfig.lib.json +15 -0
  53. package/template/packages/utils/tsconfig.node.json +21 -0
  54. package/template/packages/utils/vite.config.ts +31 -0
  55. package/template/pnpm-workspace.yaml +11 -0
  56. package/template/{.vscode/template.code-workspace → template.code-workspace} +26 -7
  57. package/template/turbo.json +24 -0
  58. package/hooks/post-checkout +0 -8
  59. package/hooks/post-merge +0 -8
  60. package/hooks/pre-commit +0 -8
  61. package/template/.vscode/extensions.json +0 -14
  62. package/template/.vscode/settings.json +0 -40
  63. package/template/_lintstagedrc.js +0 -5
  64. package/template/_npmrc +0 -3
  65. package/template/eslint.config.js +0 -11
  66. package/template/index.html +0 -13
  67. package/template/postcss.config.js +0 -6
  68. package/template/src/main.ts +0 -15
  69. package/template/src/state/auth.ts +0 -13
  70. package/template/tailwind.config.ts +0 -9
  71. package/template/tsconfig.node.json +0 -17
  72. package/template/tsconfig.vitest.json +0 -13
  73. /package/template/{_stylelintignore → apps/app/_stylelintignore} +0 -0
  74. /package/template/{env.d.ts → apps/app/env.d.ts} +0 -0
  75. /package/template/{public → apps/app/public}/favicon.ico +0 -0
  76. /package/template/{_stylelint.config.js → packages/config-stylelint/index.js} +0 -0
@@ -0,0 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention */
2
+ export default {
3
+ '*.{js,cjs,mjs,ts,cts,mts}': ['eslint --fix']
4
+ };
@@ -0,0 +1 @@
1
+ export { default } from '@[[PACKAGE_NAME]]/config-eslint';
@@ -0,0 +1 @@
1
+ ["api"]
@@ -0,0 +1,95 @@
1
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
+ import { basename, join } from 'node:path';
3
+
4
+ import { createUnimport, type Import, type ScanDir, type ScanDirExportsOptions } from 'unimport';
5
+
6
+ /**
7
+ * Writes the exports list to the package root.
8
+ *
9
+ * @param packageRoot The root directory of the package.
10
+ * @returns A promise that resolves when the exports list is written.
11
+ */
12
+ export async function writeExportsList (packageRoot: string): Promise<void> {
13
+ const importItems: Import[] = await getExportsList(packageRoot);
14
+
15
+ const names = new Set<string>();
16
+
17
+ for (const importItem of importItems) {
18
+ const name = importItem.as ?? importItem.name;
19
+
20
+ if (name === 'default') {
21
+ const from = importItem.from;
22
+
23
+ if (from) {
24
+ names.add(basename(from, '.ts'));
25
+ }
26
+ }
27
+ else {
28
+ names.add(name);
29
+ }
30
+ }
31
+
32
+ writeFileSync(join(packageRoot, 'exports-list.json'), JSON.stringify(Array.from(names).sort()));
33
+ }
34
+
35
+ /**
36
+ * Gets the exports list from the package root.
37
+ *
38
+ * @param packageRoot The root directory of the package.
39
+ * @returns The exports list.
40
+ */
41
+ async function getExportsList (packageRoot: string): Promise<Import[]> {
42
+ const unimport = createUnimport({ imports: [] });
43
+ const directories: ScanDir[] = [{ glob: '**/*.ts' }];
44
+ const options: ScanDirExportsOptions = {
45
+ cwd: join(packageRoot, 'src'),
46
+ filePatterns: ['*.ts']
47
+ };
48
+
49
+ try {
50
+ return await unimport.scanImportsFromDir(directories, options);
51
+ }
52
+ catch {
53
+ return [];
54
+ }
55
+ }
56
+
57
+ /**
58
+ * Reads the export names from the exports list.
59
+ *
60
+ * @param packageRoot The root directory of the package.
61
+ * @returns The export names.
62
+ * @throws {Error} An error if the exports list is not found.
63
+ */
64
+ export function readExportNames (packageRoot: string): string[] {
65
+ const fromManifest = readManifest(packageRoot);
66
+
67
+ if (fromManifest.length > 0) {
68
+ return fromManifest;
69
+ }
70
+
71
+ throw new Error(
72
+ '@[[PACKAGE_NAME]]/utils: exports-list.json not found. Add AppUtilsPlugin() to your Vite config (or run the dev server once).'
73
+ );
74
+ }
75
+
76
+ /**
77
+ * Reads the manifest from the exports list.
78
+ *
79
+ * @param packageRoot The root directory of the package.
80
+ * @returns The manifest.
81
+ */
82
+ function readManifest (packageRoot: string): string[] {
83
+ const manifestPath = join(packageRoot, 'exports-list.json');
84
+
85
+ if (!existsSync(manifestPath)) {
86
+ return [];
87
+ }
88
+
89
+ try {
90
+ return JSON.parse(readFileSync(manifestPath, 'utf-8')) as string[];
91
+ }
92
+ catch {
93
+ return [];
94
+ }
95
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@[[PACKAGE_NAME]]/utils",
3
+ "type": "module",
4
+ "version": "0.0.0",
5
+ "private": true,
6
+ "main": "./dist/index.mjs",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "scripts": {
10
+ "build": "run-s build-only build-types",
11
+ "build-only": "vite build",
12
+ "build-types": "vue-tsc -p tsconfig.build.json --declaration --emitDeclarationOnly",
13
+ "lint": "eslint . --cache"
14
+ },
15
+ "exports": {
16
+ ".": {
17
+ "development": "./src/index.ts",
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.mjs"
20
+ },
21
+ "./resolver": {
22
+ "types": "./resolver.ts",
23
+ "import": "./resolver.ts",
24
+ "default": "./resolver.ts"
25
+ },
26
+ "./plugin": {
27
+ "types": "./plugin.ts",
28
+ "import": "./plugin.ts",
29
+ "default": "./plugin.ts"
30
+ }
31
+ },
32
+ "files": [
33
+ "dist",
34
+ "exports-list.json",
35
+ "plugin.ts",
36
+ "resolver.ts",
37
+ "exports-list.ts"
38
+ ],
39
+ "devDependencies": {
40
+ "@[[PACKAGE_NAME]]/config-eslint": "workspace:*",
41
+ "@[[PACKAGE_NAME]]/config-typescript": "workspace:*"
42
+ }
43
+ }
@@ -0,0 +1,55 @@
1
+ import { basename, dirname, join } from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+
4
+ import type { Plugin } from 'vite';
5
+
6
+ import { writeExportsList } from './exports-list.ts';
7
+
8
+ // eslint-disable-next-line @typescript-eslint/naming-convention
9
+ const __dirname = dirname(fileURLToPath(import.meta.url));
10
+ const packageRoot = basename(__dirname) === 'dist' ? join(__dirname, '..') : __dirname;
11
+
12
+ /**
13
+ * Creates a Vite plugin that writes the exports list to the package root.
14
+ *
15
+ * @returns A Vite plugin that writes the exports list to the package root.
16
+ */
17
+ export function utilsPlugin (): Plugin {
18
+ return {
19
+ name: '@[[PACKAGE_NAME]]/utils:exports-list',
20
+ enforce: 'pre',
21
+ async config () {
22
+ await writeExportsList(packageRoot);
23
+ },
24
+ configureServer (server) {
25
+ let pending: ReturnType<typeof setTimeout> | null = null;
26
+ const schedule = (): void => {
27
+ if (pending) {
28
+ return;
29
+ }
30
+
31
+ pending = setTimeout(async () => {
32
+ pending = null;
33
+ try {
34
+ await writeExportsList(packageRoot);
35
+ }
36
+ catch (error) {
37
+ console.error('Failed to write exports list:', error);
38
+ }
39
+ }, 150);
40
+ };
41
+
42
+ try {
43
+ server.watcher.add(join(packageRoot, 'src'));
44
+ server.watcher.on('change', schedule);
45
+ server.watcher.on('add', schedule);
46
+ server.watcher.on('unlink', schedule);
47
+ }
48
+ catch {
49
+ // src may not exist in some setups
50
+ }
51
+ }
52
+ };
53
+ }
54
+
55
+ export default utilsPlugin;
@@ -0,0 +1,38 @@
1
+ import { basename, dirname, join } from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+
4
+ import type { Resolver } from 'unplugin-auto-import/types';
5
+
6
+ import { readExportNames } from './exports-list.ts';
7
+
8
+ // eslint-disable-next-line @typescript-eslint/naming-convention
9
+ const __dirname = dirname(fileURLToPath(import.meta.url));
10
+ const packageRoot = basename(__dirname) === 'dist' ? join(__dirname, '..') : __dirname;
11
+ const packageName = '@[[PACKAGE_NAME]]/utils';
12
+
13
+ /**
14
+ * Creates a resolver for the utils package.
15
+ *
16
+ * @returns A resolver for the utils package.
17
+ */
18
+ export function utilsResolver (): Resolver {
19
+ return (name) => {
20
+ let exports: string[];
21
+
22
+ try {
23
+ exports = readExportNames(packageRoot);
24
+ }
25
+ catch {
26
+ return null;
27
+ }
28
+
29
+ if (exports.includes(name)) {
30
+ return { from: packageName,
31
+ name };
32
+ }
33
+
34
+ return null;
35
+ };
36
+ }
37
+
38
+ export default utilsResolver;
@@ -0,0 +1,6 @@
1
+ import { useApi } from '@citruslime/vue-utils';
2
+
3
+ import { endpoints } from './endpoints';
4
+ import { handleFetchErrorResponse } from './errors';
5
+
6
+ export const api = useApi(endpoints, handleFetchErrorResponse, '/api');
@@ -0,0 +1,18 @@
1
+ import { createEndpoint } from '@citruslime/vue-utils';
2
+
3
+ /**
4
+ * Gets the standard headers for an API request.
5
+ *
6
+ * @param accept The MIME type of the accepted response.
7
+ * @returns The standard headers for API requests.
8
+ */
9
+ function getHeaders (accept: string = 'application/json'): HeadersInit {
10
+ return {
11
+ accept,
12
+ 'accept-language': 'en-GB'
13
+ } as HeadersInit;
14
+ }
15
+
16
+ export const endpoints = {
17
+ appInfo: createEndpoint('/appinfo', 'GET', getHeaders)
18
+ };
@@ -0,0 +1,19 @@
1
+ interface ResponseContext {
2
+ data: unknown;
3
+ response: Response | null;
4
+ error: unknown;
5
+ }
6
+
7
+ /**
8
+ * Handles error responses from the API.
9
+ *
10
+ * @param context The response context containing data, response, and error.
11
+ */
12
+ export async function handleFetchErrorResponse (context: ResponseContext): Promise<void> {
13
+ if (context.response && !context.response.ok) {
14
+ console.error(`API error: ${context.response.status} ${context.response.statusText}`);
15
+ }
16
+ else if (context.error) {
17
+ console.error('Network error:', context.error);
18
+ }
19
+ }
@@ -0,0 +1,5 @@
1
+ export interface AppInfo {
2
+ name: string;
3
+ version: string;
4
+ environment: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export { api } from './api/api';
2
+ export type { AppInfo } from './api/models/app-info';
@@ -0,0 +1,19 @@
1
+ {
2
+ "extends": "./tsconfig.lib.json",
3
+ "compilerOptions": {
4
+ "composite": false,
5
+ "rootDir": "src",
6
+ "outDir": "dist",
7
+ "noEmit": false,
8
+ "declaration": true,
9
+ "declarationMap": true,
10
+ "allowImportingTsExtensions": false
11
+ },
12
+ "include": [
13
+ "src/**/*.ts"
14
+ ],
15
+ "exclude": [
16
+ "node_modules",
17
+ "dist"
18
+ ]
19
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ {
5
+ "path": "./tsconfig.node.json"
6
+ },
7
+ {
8
+ "path": "./tsconfig.lib.json"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "extends": "@[[PACKAGE_NAME]]/config-typescript/vue.json",
3
+ "include": [
4
+ "src/**/*.ts"
5
+ ],
6
+ "exclude": [
7
+ "node_modules",
8
+ "dist"
9
+ ],
10
+ "compilerOptions": {
11
+ "composite": true,
12
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.lib.tsbuildinfo",
13
+ "allowArbitraryExtensions": true
14
+ }
15
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "extends": "@[[PACKAGE_NAME]]/config-typescript/node.json",
3
+ "include": [
4
+ "vite.config.ts",
5
+ "exports-list.ts",
6
+ "plugin.ts",
7
+ "resolver.ts"
8
+ ],
9
+ "exclude": [
10
+ "node_modules",
11
+ "dist"
12
+ ],
13
+ "compilerOptions": {
14
+ "composite": true,
15
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
16
+ "noEmit": true,
17
+ "types": [
18
+ "node"
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,31 @@
1
+ import { dirname, resolve } from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+
4
+ import { defineConfig } from 'vite';
5
+
6
+ import { utilsPlugin } from './plugin';
7
+
8
+ // eslint-disable-next-line @typescript-eslint/naming-convention
9
+ const __dirname = dirname(fileURLToPath(import.meta.url));
10
+
11
+ export default defineConfig({
12
+ plugins: [utilsPlugin()],
13
+ build: {
14
+ lib: {
15
+ entry: resolve(__dirname, 'src/index.ts'),
16
+ formats: ['es']
17
+ },
18
+ outDir: 'dist',
19
+ emptyOutDir: true,
20
+ sourcemap: true,
21
+ rollupOptions: {
22
+ external: id =>
23
+ id === 'vue' ||
24
+ id === '@citruslime/vue-utils' ||
25
+ id.startsWith('node:'),
26
+ output: {
27
+ entryFileNames: '[name].mjs'
28
+ }
29
+ }
30
+ }
31
+ });
@@ -0,0 +1,11 @@
1
+ packages:
2
+ - apps/*
3
+ - packages/*
4
+
5
+ publicHoistPattern:
6
+ - "*eslint*"
7
+ - "*stylelint*"
8
+
9
+ allowBuilds:
10
+ esbuild: true
11
+ unrs-resolver: true
@@ -2,11 +2,31 @@
2
2
  "folders": [
3
3
  {
4
4
  "name": "Root",
5
- "path": ".."
5
+ "path": "."
6
6
  },
7
7
  {
8
- "name": "Hooks",
9
- "path": "[[HUSKY_DIR]]"
8
+ "name": "App",
9
+ "path": "apps/app"
10
+ },
11
+ {
12
+ "name": "ESLint Config",
13
+ "path": "packages/config-eslint"
14
+ },
15
+ {
16
+ "name": "Stylelint Config",
17
+ "path": "packages/config-stylelint"
18
+ },
19
+ {
20
+ "name": "TypeScript Config",
21
+ "path": "packages/config-typescript"
22
+ },
23
+ {
24
+ "name": "Utils",
25
+ "path": "packages/utils"
26
+ },
27
+ {
28
+ "name": "Git Hooks",
29
+ "path": "[[GIT_ROOT]]/.husky"
10
30
  }
11
31
  ],
12
32
  "settings": {
@@ -24,7 +44,6 @@
24
44
  },
25
45
  "editor.defaultFormatter": "dbaeumer.vscode-eslint",
26
46
  "editor.formatOnSave": true,
27
- "eslint.experimental.useFlatConfig": true,
28
47
  "eslint.validate": [
29
48
  "html",
30
49
  "javascript",
@@ -36,8 +55,8 @@
36
55
  "files.exclude": {
37
56
  ".husky": true,
38
57
  "node_modules": true,
39
- "packages": true,
40
- "pipelines": true
58
+ "apps": true,
59
+ "packages": true
41
60
  },
42
61
  "stylelint.validate": [
43
62
  "css",
@@ -63,4 +82,4 @@
63
82
  "antfu.iconify"
64
83
  ]
65
84
  }
66
- }
85
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "tasks": {
4
+ "build": {
5
+ "dependsOn": [
6
+ "^build"
7
+ ],
8
+ "outputs": [
9
+ "dist/**"
10
+ ]
11
+ },
12
+ "dev": {
13
+ "cache": false,
14
+ "persistent": true
15
+ },
16
+ "preview": {
17
+ "cache": false,
18
+ "persistent": true
19
+ },
20
+ "lint": {
21
+ "outputs": []
22
+ }
23
+ }
24
+ }
@@ -1,8 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- if ! command -v pnpm; then
5
- choco install pnpm -y
6
- fi
7
-
8
- pnpm install -w -C "[[PACKAGE_DIR]]"
package/hooks/post-merge DELETED
@@ -1,8 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- if ! command -v pnpm; then
5
- choco install pnpm -y
6
- fi
7
-
8
- pnpm install -w -C "[[PACKAGE_DIR]]"
package/hooks/pre-commit DELETED
@@ -1,8 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- if ! command -v pnpm; then
5
- choco install pnpm -y
6
- fi
7
-
8
- pnpm -C "[[PACKAGE_DIR]]" pre-commit-lint
@@ -1,14 +0,0 @@
1
- {
2
- "recommendations": [
3
- "Vue.volar",
4
- "dbaeumer.vscode-eslint",
5
- "stylelint.vscode-stylelint",
6
- "bradlc.vscode-tailwindcss",
7
- "eamodio.gitlens",
8
- "christian-kohler.npm-intellisense",
9
- "pmneo.tsimporter",
10
- "editorconfig.editorconfig",
11
- "cpylua.language-postcss",
12
- "antfu.iconify"
13
- ]
14
- }
@@ -1,40 +0,0 @@
1
- {
2
- "[json]": {
3
- "editor.defaultFormatter": "vscode.json-language-features"
4
- },
5
- "[jsonc]": {
6
- "editor.defaultFormatter": "vscode.json-language-features"
7
- },
8
- "editor.codeActionsOnSave": {
9
- "source.fixAll": "explicit",
10
- "source.fixAll.eslint": "explicit",
11
- "source.fixAll.stylelint": "explicit",
12
- "source.organizeImports": "never"
13
- },
14
- "editor.defaultFormatter": "dbaeumer.vscode-eslint",
15
- "editor.formatOnSave": true,
16
- "eslint.experimental.useFlatConfig": true,
17
- "eslint.validate": [
18
- "html",
19
- "javascript",
20
- "typescript",
21
- "vue"
22
- ],
23
- "files.encoding": "utf8",
24
- "files.eol": "\n",
25
- "files.exclude": {
26
- ".husky": true,
27
- "node_modules": true,
28
- "packages": true,
29
- "pipelines": true
30
- },
31
- "stylelint.validate": [
32
- "css",
33
- "postcss",
34
- "vue"
35
- ],
36
- "tailwindCSS.includeLanguages": {
37
- "vue": "html",
38
- "vue-html": "html"
39
- }
40
- }
@@ -1,5 +0,0 @@
1
- /* eslint-disable @typescript-eslint/naming-convention */
2
- export default {
3
- './**/*.+(js|cjs|mjs|ts|cts|mts|vue)': ['eslint --fix'],
4
- './**/*.(css|vue)': ['stylelint --fix']
5
- };
package/template/_npmrc DELETED
@@ -1,3 +0,0 @@
1
- public-hoist-pattern[]=*eslint*
2
- public-hoist-pattern[]=*stylelint*
3
- public-hoist-pattern[]=*tailwindcss*
@@ -1,11 +0,0 @@
1
- import config from '@citruslime/config/eslint';
2
- import { FlatCompat } from '@eslint/eslintrc';
3
-
4
- const compat = new FlatCompat({
5
- baseDirectory: import.meta.url
6
- });
7
-
8
- export default [
9
- ...config,
10
- ...compat.extends('./.eslintrc-auto-import.json')
11
- ];
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" href="/favicon.ico" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
7
- <title>[[PACKAGE_NAME]]</title>
8
- </head>
9
- <body>
10
- <div id="app"></div>
11
- <script type="module" src="/src/main.ts"></script>
12
- </body>
13
- </html>
@@ -1,6 +0,0 @@
1
- export default {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {}
5
- }
6
- };
@@ -1,15 +0,0 @@
1
- import { i18n } from '@citruslime/ui';
2
- import '@citruslime/utils';
3
- import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
4
-
5
- import app from './app.vue';
6
-
7
- const pinia = createPinia();
8
-
9
- pinia.use(piniaPluginPersistedstate);
10
-
11
- createApp(app)
12
- .use(router)
13
- .use(i18n)
14
- .use(pinia)
15
- .mount('#app');
@@ -1,13 +0,0 @@
1
- export const useAuthStore = defineStore('auth', () => {
2
- const username = ref<string>('Nobody');
3
- const loginDate = ref<string | null>(null);
4
-
5
- return {
6
- username,
7
- loginDate
8
- };
9
- }, {
10
- persist: {
11
- storage: localStorage
12
- }
13
- });