@devvmichael/create-stacks-app 0.1.0

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 (115) hide show
  1. package/dist/commands/add.d.ts +8 -0
  2. package/dist/commands/add.d.ts.map +1 -0
  3. package/dist/commands/add.js +215 -0
  4. package/dist/commands/add.js.map +1 -0
  5. package/dist/commands/create.d.ts +3 -0
  6. package/dist/commands/create.d.ts.map +1 -0
  7. package/dist/commands/create.js +63 -0
  8. package/dist/commands/create.js.map +1 -0
  9. package/dist/commands/deploy.d.ts +7 -0
  10. package/dist/commands/deploy.d.ts.map +1 -0
  11. package/dist/commands/deploy.js +159 -0
  12. package/dist/commands/deploy.js.map +1 -0
  13. package/dist/index.d.ts +3 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +47 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/prompts/project.d.ts +4 -0
  18. package/dist/prompts/project.d.ts.map +1 -0
  19. package/dist/prompts/project.js +124 -0
  20. package/dist/prompts/project.js.map +1 -0
  21. package/dist/templates/installer.d.ts +4 -0
  22. package/dist/templates/installer.d.ts.map +1 -0
  23. package/dist/templates/installer.js +91 -0
  24. package/dist/templates/installer.js.map +1 -0
  25. package/dist/types/index.d.ts +40 -0
  26. package/dist/types/index.d.ts.map +1 -0
  27. package/dist/types/index.js +2 -0
  28. package/dist/types/index.js.map +1 -0
  29. package/dist/utils/clarinet.d.ts +5 -0
  30. package/dist/utils/clarinet.d.ts.map +1 -0
  31. package/dist/utils/clarinet.js +72 -0
  32. package/dist/utils/clarinet.js.map +1 -0
  33. package/dist/utils/filesystem.d.ts +4 -0
  34. package/dist/utils/filesystem.d.ts.map +1 -0
  35. package/dist/utils/filesystem.js +158 -0
  36. package/dist/utils/filesystem.js.map +1 -0
  37. package/dist/utils/git.d.ts +2 -0
  38. package/dist/utils/git.d.ts.map +1 -0
  39. package/dist/utils/git.js +21 -0
  40. package/dist/utils/git.js.map +1 -0
  41. package/dist/utils/logger.d.ts +7 -0
  42. package/dist/utils/logger.d.ts.map +1 -0
  43. package/dist/utils/logger.js +45 -0
  44. package/dist/utils/logger.js.map +1 -0
  45. package/dist/utils/package-manager.d.ts +5 -0
  46. package/dist/utils/package-manager.d.ts.map +1 -0
  47. package/dist/utils/package-manager.js +65 -0
  48. package/dist/utils/package-manager.js.map +1 -0
  49. package/dist/utils/validation.d.ts +5 -0
  50. package/dist/utils/validation.d.ts.map +1 -0
  51. package/dist/utils/validation.js +41 -0
  52. package/dist/utils/validation.js.map +1 -0
  53. package/package.json +52 -0
  54. package/templates/base/editorconfig +12 -0
  55. package/templates/base/gitignore +13 -0
  56. package/templates/base/prettierrc +7 -0
  57. package/templates/contracts/counter/counter.clar +43 -0
  58. package/templates/contracts/counter/counter.test.ts +127 -0
  59. package/templates/contracts/defi/sip010-trait.clar +11 -0
  60. package/templates/contracts/defi/staking-pool.clar +20 -0
  61. package/templates/contracts/marketplace/nft-marketplace.clar +44 -0
  62. package/templates/contracts/marketplace/nft-trait.clar +8 -0
  63. package/templates/contracts/marketplace/sip009-nft.clar +25 -0
  64. package/templates/contracts/nft/nft.clar +111 -0
  65. package/templates/contracts/nft/nft.test.ts +204 -0
  66. package/templates/contracts/token/token.clar +67 -0
  67. package/templates/contracts/token/token.test.ts +139 -0
  68. package/templates/frontends/nextjs/template/.env.example +2 -0
  69. package/templates/frontends/nextjs/template/app/globals.css +40 -0
  70. package/templates/frontends/nextjs/template/app/layout.tsx +36 -0
  71. package/templates/frontends/nextjs/template/app/page.tsx +42 -0
  72. package/templates/frontends/nextjs/template/app/providers.tsx +31 -0
  73. package/templates/frontends/nextjs/template/components/contracts/counter-interaction.tsx +80 -0
  74. package/templates/frontends/nextjs/template/components/header.tsx +24 -0
  75. package/templates/frontends/nextjs/template/components/wallet/connect-button.tsx +44 -0
  76. package/templates/frontends/nextjs/template/hooks/use-contract-call.ts +52 -0
  77. package/templates/frontends/nextjs/template/hooks/use-contract-read.ts +49 -0
  78. package/templates/frontends/nextjs/template/hooks/use-stacks.ts +26 -0
  79. package/templates/frontends/nextjs/template/lib/contracts.ts +29 -0
  80. package/templates/frontends/nextjs/template/lib/stacks.ts +18 -0
  81. package/templates/frontends/nextjs/template/next.config.js +6 -0
  82. package/templates/frontends/nextjs/template/package.json +29 -0
  83. package/templates/frontends/nextjs/template/postcss.config.js +6 -0
  84. package/templates/frontends/nextjs/template/public/logo.svg +3 -0
  85. package/templates/frontends/nextjs/template/tailwind.config.js +18 -0
  86. package/templates/frontends/nextjs/template/tsconfig.json +26 -0
  87. package/templates/frontends/react/template/.env.example +2 -0
  88. package/templates/frontends/react/template/index.html +13 -0
  89. package/templates/frontends/react/template/package.json +29 -0
  90. package/templates/frontends/react/template/postcss.config.js +6 -0
  91. package/templates/frontends/react/template/public/logo.svg +3 -0
  92. package/templates/frontends/react/template/src/App.tsx +100 -0
  93. package/templates/frontends/react/template/src/components/CounterInteraction.tsx +121 -0
  94. package/templates/frontends/react/template/src/components/Header.tsx +39 -0
  95. package/templates/frontends/react/template/src/index.css +33 -0
  96. package/templates/frontends/react/template/src/main.tsx +10 -0
  97. package/templates/frontends/react/template/tailwind.config.js +15 -0
  98. package/templates/frontends/react/template/tsconfig.json +25 -0
  99. package/templates/frontends/react/template/tsconfig.node.json +10 -0
  100. package/templates/frontends/react/template/vite.config.ts +12 -0
  101. package/templates/frontends/vue/template/.env.example +2 -0
  102. package/templates/frontends/vue/template/index.html +13 -0
  103. package/templates/frontends/vue/template/package.json +27 -0
  104. package/templates/frontends/vue/template/postcss.config.js +6 -0
  105. package/templates/frontends/vue/template/public/logo.svg +3 -0
  106. package/templates/frontends/vue/template/src/App.vue +98 -0
  107. package/templates/frontends/vue/template/src/components/AppHeader.vue +39 -0
  108. package/templates/frontends/vue/template/src/components/CounterInteraction.vue +120 -0
  109. package/templates/frontends/vue/template/src/env.d.ts +16 -0
  110. package/templates/frontends/vue/template/src/main.ts +5 -0
  111. package/templates/frontends/vue/template/src/style.css +33 -0
  112. package/templates/frontends/vue/template/tailwind.config.js +15 -0
  113. package/templates/frontends/vue/template/tsconfig.json +25 -0
  114. package/templates/frontends/vue/template/tsconfig.node.json +10 -0
  115. package/templates/frontends/vue/template/vite.config.ts +12 -0
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+ import './index.css';
5
+
6
+ ReactDOM.createRoot(document.getElementById('root')!).render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>
10
+ );
@@ -0,0 +1,15 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
4
+ theme: {
5
+ extend: {
6
+ colors: {
7
+ stacks: {
8
+ purple: '#5546FF',
9
+ 'purple-dark': '#3D2DB8',
10
+ },
11
+ },
12
+ },
13
+ },
14
+ plugins: [],
15
+ };
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "noEmit": true,
13
+ "jsx": "react-jsx",
14
+ "strict": true,
15
+ "noUnusedLocals": true,
16
+ "noUnusedParameters": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "baseUrl": ".",
19
+ "paths": {
20
+ "@/*": ["src/*"]
21
+ }
22
+ },
23
+ "include": ["src"],
24
+ "references": [{ "path": "./tsconfig.node.json" }]
25
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true
8
+ },
9
+ "include": ["vite.config.ts"]
10
+ }
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ import path from 'path';
4
+
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ resolve: {
8
+ alias: {
9
+ '@': path.resolve(__dirname, './src'),
10
+ },
11
+ },
12
+ });
@@ -0,0 +1,2 @@
1
+ VITE_NETWORK=testnet
2
+ VITE_CONTRACT_ADDRESS=ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/logo.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Stacks App</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "stacks-app-frontend",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vue-tsc && vite build",
9
+ "preview": "vite preview",
10
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts"
11
+ },
12
+ "dependencies": {
13
+ "@stacks/connect": "^7.8.2",
14
+ "@stacks/network": "^6.13.0",
15
+ "@stacks/transactions": "^6.13.1",
16
+ "vue": "^3.4.0"
17
+ },
18
+ "devDependencies": {
19
+ "@vitejs/plugin-vue": "^4.5.2",
20
+ "autoprefixer": "^10.4.16",
21
+ "postcss": "^8.4.32",
22
+ "tailwindcss": "^3.3.6",
23
+ "typescript": "^5.3.3",
24
+ "vite": "^5.0.10",
25
+ "vue-tsc": "^1.8.25"
26
+ }
27
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ };
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill="#5546FF" d="M16 0L3 8v16l13 8 13-8V8L16 0zm0 4l9 5.5v11L16 26l-9-5.5v-11L16 4z"/>
3
+ </svg>
@@ -0,0 +1,98 @@
1
+ <script setup lang="ts">
2
+ import { ref, onMounted } from 'vue';
3
+ import { AppConfig, UserSession, showConnect } from '@stacks/connect';
4
+ import { StacksTestnet, StacksMainnet } from '@stacks/network';
5
+ import AppHeader from './components/AppHeader.vue';
6
+ import CounterInteraction from './components/CounterInteraction.vue';
7
+
8
+ const appConfig = new AppConfig(['store_write', 'publish_data']);
9
+ const userSession = new UserSession({ appConfig });
10
+
11
+ const network =
12
+ import.meta.env.VITE_NETWORK === 'mainnet'
13
+ ? new StacksMainnet()
14
+ : new StacksTestnet();
15
+
16
+ const address = ref<string | null>(null);
17
+
18
+ onMounted(() => {
19
+ if (userSession.isUserSignedIn()) {
20
+ const userData = userSession.loadUserData();
21
+ const networkKey = import.meta.env.VITE_NETWORK === 'mainnet' ? 'mainnet' : 'testnet';
22
+ address.value = userData.profile.stxAddress[networkKey];
23
+ }
24
+ });
25
+
26
+ function handleConnect() {
27
+ showConnect({
28
+ appDetails: {
29
+ name: 'Stacks App',
30
+ icon: window.location.origin + '/logo.svg',
31
+ },
32
+ redirectTo: '/',
33
+ onFinish: () => {
34
+ window.location.reload();
35
+ },
36
+ userSession,
37
+ });
38
+ }
39
+
40
+ function handleDisconnect() {
41
+ userSession.signUserOut('/');
42
+ }
43
+ </script>
44
+
45
+ <template>
46
+ <div class="min-h-screen flex flex-col">
47
+ <AppHeader
48
+ :address="address"
49
+ @connect="handleConnect"
50
+ @disconnect="handleDisconnect"
51
+ />
52
+
53
+ <main class="flex-1 container mx-auto px-4 py-8">
54
+ <div class="mb-8 text-center">
55
+ <h1 class="mb-4 text-4xl font-bold">Welcome to Your Stacks App</h1>
56
+ <p class="text-lg text-gray-400">
57
+ A full-stack Stacks blockchain application
58
+ </p>
59
+ </div>
60
+
61
+ <div class="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
62
+ <CounterInteraction
63
+ :network="network"
64
+ :is-connected="!!address"
65
+ :sender-address="address"
66
+ />
67
+ </div>
68
+
69
+ <div class="mt-12 text-center">
70
+ <h2 class="mb-4 text-2xl font-bold">Get Started</h2>
71
+ <div class="grid gap-4 md:grid-cols-3 max-w-3xl mx-auto">
72
+ <div class="card">
73
+ <h3 class="font-semibold mb-2">📝 Edit Contracts</h3>
74
+ <p class="text-sm text-gray-400">
75
+ Modify contracts in <code class="bg-gray-800 px-1 rounded">contracts/</code>
76
+ </p>
77
+ </div>
78
+ <div class="card">
79
+ <h3 class="font-semibold mb-2">🧪 Run Tests</h3>
80
+ <p class="text-sm text-gray-400">
81
+ Run <code class="bg-gray-800 px-1 rounded">npm run test</code>
82
+ </p>
83
+ </div>
84
+ <div class="card">
85
+ <h3 class="font-semibold mb-2">🚀 Deploy</h3>
86
+ <p class="text-sm text-gray-400">
87
+ Run <code class="bg-gray-800 px-1 rounded">npm run deploy:testnet</code>
88
+ </p>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ </main>
93
+
94
+ <footer class="border-t border-gray-800 py-6 text-center text-sm text-gray-500">
95
+ Built with Create Stacks App
96
+ </footer>
97
+ </div>
98
+ </template>
@@ -0,0 +1,39 @@
1
+ <script setup lang="ts">
2
+ defineProps<{
3
+ address: string | null;
4
+ }>();
5
+
6
+ const emit = defineEmits<{
7
+ connect: [];
8
+ disconnect: [];
9
+ }>();
10
+ </script>
11
+
12
+ <template>
13
+ <header class="border-b border-gray-800">
14
+ <div class="container mx-auto px-4 py-4 flex items-center justify-between">
15
+ <a href="/" class="flex items-center gap-2">
16
+ <svg
17
+ class="w-8 h-8 text-stacks-purple"
18
+ viewBox="0 0 32 32"
19
+ fill="currentColor"
20
+ >
21
+ <path d="M16 0L3 8v16l13 8 13-8V8L16 0zm0 4l9 5.5v11L16 26l-9-5.5v-11L16 4z" />
22
+ </svg>
23
+ <span class="font-bold text-xl">Stacks App</span>
24
+ </a>
25
+
26
+ <div v-if="address" class="flex items-center gap-3">
27
+ <span class="text-sm bg-gray-800 px-3 py-1 rounded-full">
28
+ {{ address.slice(0, 6) }}...{{ address.slice(-4) }}
29
+ </span>
30
+ <button @click="emit('disconnect')" class="btn-secondary text-sm">
31
+ Disconnect
32
+ </button>
33
+ </div>
34
+ <button v-else @click="emit('connect')" class="btn-primary">
35
+ Connect Wallet
36
+ </button>
37
+ </div>
38
+ </header>
39
+ </template>
@@ -0,0 +1,120 @@
1
+ <script setup lang="ts">
2
+ import { ref, onMounted } from 'vue';
3
+ import { openContractCall } from '@stacks/connect';
4
+ import { callReadOnlyFunction, cvToValue } from '@stacks/transactions';
5
+ import type { StacksNetwork } from '@stacks/network';
6
+
7
+ const props = defineProps<{
8
+ network: StacksNetwork;
9
+ isConnected: boolean;
10
+ senderAddress: string | null;
11
+ }>();
12
+
13
+ const contractAddress = import.meta.env.VITE_CONTRACT_ADDRESS || 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM';
14
+ const contractName = 'counter';
15
+
16
+ const counter = ref<number | null>(null);
17
+ const isLoading = ref(true);
18
+ const isIncrementing = ref(false);
19
+ const isDecrementing = ref(false);
20
+
21
+ async function fetchCounter() {
22
+ try {
23
+ const result = await callReadOnlyFunction({
24
+ contractAddress,
25
+ contractName,
26
+ functionName: 'get-counter',
27
+ functionArgs: [],
28
+ network: props.network,
29
+ senderAddress: contractAddress,
30
+ });
31
+ const value = cvToValue(result);
32
+ counter.value = value?.value ?? 0;
33
+ } catch (error) {
34
+ console.error('Failed to fetch counter:', error);
35
+ } finally {
36
+ isLoading.value = false;
37
+ }
38
+ }
39
+
40
+ onMounted(() => {
41
+ fetchCounter();
42
+ });
43
+
44
+ async function handleIncrement() {
45
+ if (!props.senderAddress) return;
46
+ isIncrementing.value = true;
47
+ try {
48
+ await openContractCall({
49
+ contractAddress,
50
+ contractName,
51
+ functionName: 'increment',
52
+ functionArgs: [],
53
+ network: props.network,
54
+ onFinish: () => {
55
+ setTimeout(fetchCounter, 2000);
56
+ },
57
+ });
58
+ } catch (error) {
59
+ console.error('Increment failed:', error);
60
+ } finally {
61
+ isIncrementing.value = false;
62
+ }
63
+ }
64
+
65
+ async function handleDecrement() {
66
+ if (!props.senderAddress) return;
67
+ isDecrementing.value = true;
68
+ try {
69
+ await openContractCall({
70
+ contractAddress,
71
+ contractName,
72
+ functionName: 'decrement',
73
+ functionArgs: [],
74
+ network: props.network,
75
+ onFinish: () => {
76
+ setTimeout(fetchCounter, 2000);
77
+ },
78
+ });
79
+ } catch (error) {
80
+ console.error('Decrement failed:', error);
81
+ } finally {
82
+ isDecrementing.value = false;
83
+ }
84
+ }
85
+ </script>
86
+
87
+ <template>
88
+ <div class="card">
89
+ <h2 class="text-2xl font-bold mb-4">Counter Contract</h2>
90
+
91
+ <div class="mb-6 text-center">
92
+ <div class="text-6xl font-bold text-stacks-purple">
93
+ {{ isLoading ? '...' : counter }}
94
+ </div>
95
+ <p class="text-sm text-gray-500 mt-2">Current count</p>
96
+ </div>
97
+
98
+ <template v-if="isConnected">
99
+ <div class="flex gap-2">
100
+ <button
101
+ @click="handleDecrement"
102
+ :disabled="isDecrementing || counter === 0"
103
+ class="btn-secondary flex-1 disabled:opacity-50"
104
+ >
105
+ {{ isDecrementing ? 'Processing...' : '− Decrement' }}
106
+ </button>
107
+ <button
108
+ @click="handleIncrement"
109
+ :disabled="isIncrementing"
110
+ class="btn-primary flex-1 disabled:opacity-50"
111
+ >
112
+ {{ isIncrementing ? 'Processing...' : '+ Increment' }}
113
+ </button>
114
+ </div>
115
+ </template>
116
+ <p v-else class="text-center text-gray-500">
117
+ Connect your wallet to interact with the contract
118
+ </p>
119
+ </div>
120
+ </template>
@@ -0,0 +1,16 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module '*.vue' {
4
+ import type { DefineComponent } from 'vue';
5
+ const component: DefineComponent<{}, {}, any>;
6
+ export default component;
7
+ }
8
+
9
+ interface ImportMetaEnv {
10
+ readonly VITE_NETWORK: string;
11
+ readonly VITE_CONTRACT_ADDRESS: string;
12
+ }
13
+
14
+ interface ImportMeta {
15
+ readonly env: ImportMetaEnv;
16
+ }
@@ -0,0 +1,5 @@
1
+ import { createApp } from 'vue';
2
+ import './style.css';
3
+ import App from './App.vue';
4
+
5
+ createApp(App).mount('#app');
@@ -0,0 +1,33 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ :root {
6
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
7
+ line-height: 1.5;
8
+ font-weight: 400;
9
+ color-scheme: light dark;
10
+ color: rgba(255, 255, 255, 0.87);
11
+ background-color: #242424;
12
+ font-synthesis: none;
13
+ text-rendering: optimizeLegibility;
14
+ -webkit-font-smoothing: antialiased;
15
+ -moz-osx-font-smoothing: grayscale;
16
+ }
17
+
18
+ body {
19
+ margin: 0;
20
+ min-height: 100vh;
21
+ }
22
+
23
+ .btn-primary {
24
+ @apply bg-stacks-purple hover:bg-stacks-purple-dark text-white font-semibold py-2 px-4 rounded-lg transition-colors cursor-pointer;
25
+ }
26
+
27
+ .btn-secondary {
28
+ @apply border border-gray-600 hover:bg-gray-800 font-semibold py-2 px-4 rounded-lg transition-colors cursor-pointer;
29
+ }
30
+
31
+ .card {
32
+ @apply bg-gray-900 rounded-xl shadow-lg p-6 border border-gray-700;
33
+ }
@@ -0,0 +1,15 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
4
+ theme: {
5
+ extend: {
6
+ colors: {
7
+ stacks: {
8
+ purple: '#5546FF',
9
+ 'purple-dark': '#3D2DB8',
10
+ },
11
+ },
12
+ },
13
+ },
14
+ plugins: [],
15
+ };
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "noEmit": true,
13
+ "jsx": "preserve",
14
+ "strict": true,
15
+ "noUnusedLocals": true,
16
+ "noUnusedParameters": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "baseUrl": ".",
19
+ "paths": {
20
+ "@/*": ["src/*"]
21
+ }
22
+ },
23
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
24
+ "references": [{ "path": "./tsconfig.node.json" }]
25
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true
8
+ },
9
+ "include": ["vite.config.ts"]
10
+ }
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from 'vite';
2
+ import vue from '@vitejs/plugin-vue';
3
+ import path from 'path';
4
+
5
+ export default defineConfig({
6
+ plugins: [vue()],
7
+ resolve: {
8
+ alias: {
9
+ '@': path.resolve(__dirname, './src'),
10
+ },
11
+ },
12
+ });