frontend-hamroun 1.2.83 → 1.2.85
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.
- package/bin/cli.js +57 -869
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.cjs.map +1 -1
- package/dist/index.client.js +2 -2
- package/dist/index.client.js.map +1 -1
- package/dist/index.js +116 -136
- package/dist/index.js.map +1 -1
- package/dist/jsx-runtime.cjs.map +1 -1
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/renderer-DaVfBeVi.cjs +2 -0
- package/dist/renderer-DaVfBeVi.cjs.map +1 -0
- package/dist/renderer-nfT7XSpo.js +61 -0
- package/dist/renderer-nfT7XSpo.js.map +1 -0
- package/dist/server-renderer-B5b0Q0ck.cjs +2 -0
- package/dist/server-renderer-B5b0Q0ck.cjs.map +1 -0
- package/dist/{server-renderer-C1WXH-zV.js → server-renderer-C4MB-jAp.js} +6 -39
- package/dist/server-renderer-C4MB-jAp.js.map +1 -0
- package/dist/server-renderer.cjs +1 -1
- package/dist/server-renderer.js +1 -1
- package/package.json +1 -1
- package/templates/basic-app/build.d.ts +2 -0
- package/templates/basic-app/build.d.ts.map +1 -0
- package/templates/basic-app/dev.d.ts +2 -0
- package/templates/basic-app/dev.d.ts.map +1 -0
- package/templates/basic-app/esbuild.config.d.ts +2 -0
- package/templates/basic-app/esbuild.config.d.ts.map +1 -0
- package/templates/basic-app/postcss.config.d.ts +8 -0
- package/templates/basic-app/postcss.config.d.ts.map +1 -0
- package/templates/basic-app/server.d.ts +2 -0
- package/templates/basic-app/server.d.ts.map +1 -0
- package/templates/basic-app/src/App.d.ts +2 -0
- package/templates/basic-app/src/App.d.ts.map +1 -0
- package/templates/basic-app/src/App.js +148 -0
- package/templates/basic-app/src/App.tsx +397 -19
- package/templates/basic-app/src/client.d.ts +2 -0
- package/templates/basic-app/src/client.d.ts.map +1 -0
- package/templates/basic-app/src/client.js +6 -0
- package/templates/basic-app/src/components/Counter.d.ts +4 -0
- package/templates/basic-app/src/components/Counter.d.ts.map +1 -0
- package/templates/basic-app/src/components/Counter.js +9 -0
- package/templates/basic-app/src/jsx-shim.d.ts +8 -0
- package/templates/basic-app/src/jsx-shim.d.ts.map +1 -0
- package/templates/basic-app/src/main.d.ts +2 -0
- package/templates/basic-app/src/main.d.ts.map +1 -0
- package/templates/basic-app/src/main.js +57 -0
- package/templates/basic-app/src/server.d.ts +2 -0
- package/templates/basic-app/src/server.d.ts.map +1 -0
- package/templates/basic-app/tailwind.config.d.ts +9 -0
- package/templates/basic-app/tailwind.config.d.ts.map +1 -0
- package/templates/basic-app/vite.config.d.ts +3 -0
- package/templates/basic-app/vite.config.d.ts.map +1 -0
- package/templates/basic-app/vite.config.js +7 -0
- package/templates/complete-app/api/hello.d.ts +1 -0
- package/templates/complete-app/api/hello.d.ts.map +1 -0
- package/templates/complete-app/client.d.ts +2 -0
- package/templates/complete-app/client.d.ts.map +1 -0
- package/templates/complete-app/lib/frontend-hamroun.d.ts +18 -0
- package/templates/complete-app/lib/frontend-hamroun.d.ts.map +1 -0
- package/templates/complete-app/pages/about.d.ts +7 -0
- package/templates/complete-app/pages/about.d.ts.map +1 -0
- package/templates/complete-app/pages/index.d.ts +7 -0
- package/templates/complete-app/pages/index.d.ts.map +1 -0
- package/templates/complete-app/pages/wasm-demo.d.ts +7 -0
- package/templates/complete-app/pages/wasm-demo.d.ts.map +1 -0
- package/templates/complete-app/public/client.d.ts +17 -0
- package/templates/complete-app/public/client.d.ts.map +1 -0
- package/templates/complete-app/server.d.ts +2 -0
- package/templates/complete-app/server.d.ts.map +1 -0
- package/templates/complete-app/server.js +236 -218
- package/templates/complete-app/src/App.d.ts +2 -0
- package/templates/complete-app/src/App.d.ts.map +1 -0
- package/templates/complete-app/src/App.js +27 -0
- package/templates/complete-app/src/client.d.ts +2 -0
- package/templates/complete-app/src/client.d.ts.map +1 -0
- package/templates/complete-app/src/client.js +52 -0
- package/templates/complete-app/src/pages/index.d.ts +2 -0
- package/templates/complete-app/src/pages/index.d.ts.map +1 -0
- package/templates/complete-app/src/pages/index.js +19 -0
- package/templates/complete-app/src/server.d.ts +2 -0
- package/templates/complete-app/src/server.d.ts.map +1 -0
- package/templates/complete-app/src/server.js +192 -0
- package/templates/complete-app/vite.config.d.ts +3 -0
- package/templates/complete-app/vite.config.d.ts.map +1 -0
- package/templates/complete-app/vite.config.js +29 -57
- package/templates/fullstack-app/api/hello.d.ts +4 -0
- package/templates/fullstack-app/api/hello.d.ts.map +1 -0
- package/templates/fullstack-app/api/hello.js +14 -11
- package/templates/fullstack-app/api/users/[id].d.ts +5 -0
- package/templates/fullstack-app/api/users/[id].d.ts.map +1 -0
- package/templates/fullstack-app/api/users/[id].js +52 -0
- package/templates/fullstack-app/api/users/index.d.ts +4 -0
- package/templates/fullstack-app/api/users/index.d.ts.map +1 -0
- package/templates/fullstack-app/api/users/index.js +25 -0
- package/templates/fullstack-app/build/main.d.ts +211 -0
- package/templates/fullstack-app/build/main.d.ts.map +1 -0
- package/templates/fullstack-app/build.d.ts +2 -0
- package/templates/fullstack-app/build.d.ts.map +1 -0
- package/templates/fullstack-app/build.js +190 -0
- package/templates/fullstack-app/postcss.config.d.ts +5 -0
- package/templates/fullstack-app/postcss.config.d.ts.map +1 -0
- package/templates/fullstack-app/process-tailwind.d.ts +2 -0
- package/templates/fullstack-app/process-tailwind.d.ts.map +1 -0
- package/templates/fullstack-app/public/route-handler.d.ts +1 -0
- package/templates/fullstack-app/public/route-handler.d.ts.map +1 -0
- package/templates/fullstack-app/server.d.ts +2 -0
- package/templates/fullstack-app/server.d.ts.map +1 -0
- package/templates/fullstack-app/server.js +428 -266
- package/templates/fullstack-app/src/client.d.ts +2 -0
- package/templates/fullstack-app/src/client.d.ts.map +1 -0
- package/templates/fullstack-app/src/components/ClientHome.d.ts +1 -0
- package/templates/fullstack-app/src/components/ClientHome.d.ts.map +1 -0
- package/templates/fullstack-app/src/components/ClientHome.js +1 -0
- package/templates/fullstack-app/src/components/ErrorBoundary.d.ts +7 -0
- package/templates/fullstack-app/src/components/ErrorBoundary.d.ts.map +1 -0
- package/templates/fullstack-app/src/components/ErrorBoundary.js +12 -0
- package/templates/fullstack-app/src/components/Layout.d.ts +7 -0
- package/templates/fullstack-app/src/components/Layout.d.ts.map +1 -0
- package/templates/fullstack-app/src/components/Layout.js +4 -0
- package/templates/fullstack-app/src/components/StateDemo.d.ts +2 -0
- package/templates/fullstack-app/src/components/StateDemo.d.ts.map +1 -0
- package/templates/fullstack-app/src/components/StateDemo.js +86 -0
- package/templates/fullstack-app/src/components/UserList.d.ts +11 -0
- package/templates/fullstack-app/src/components/UserList.d.ts.map +1 -0
- package/templates/fullstack-app/src/components/UserList.js +7 -0
- package/templates/fullstack-app/src/config.d.ts +29 -0
- package/templates/fullstack-app/src/config.d.ts.map +1 -0
- package/templates/fullstack-app/src/config.js +36 -0
- package/templates/fullstack-app/src/data/api.d.ts +35 -0
- package/templates/fullstack-app/src/data/api.d.ts.map +1 -0
- package/templates/fullstack-app/src/data/api.js +173 -0
- package/templates/fullstack-app/src/main.d.ts +7 -0
- package/templates/fullstack-app/src/main.d.ts.map +1 -0
- package/templates/fullstack-app/src/main.js +130 -0
- package/templates/fullstack-app/src/middleware.d.ts +10 -0
- package/templates/fullstack-app/src/middleware.d.ts.map +1 -0
- package/templates/fullstack-app/src/middleware.js +14 -0
- package/templates/fullstack-app/src/pages/404.d.ts +4 -0
- package/templates/fullstack-app/src/pages/404.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/404.js +4 -0
- package/templates/fullstack-app/src/pages/[id].d.ts +1 -0
- package/templates/fullstack-app/src/pages/[id].d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/[id].js +1 -0
- package/templates/fullstack-app/src/pages/_app.d.ts +6 -0
- package/templates/fullstack-app/src/pages/_app.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/_app.js +6 -0
- package/templates/fullstack-app/src/pages/_document.d.ts +7 -0
- package/templates/fullstack-app/src/pages/_document.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/_document.js +4 -0
- package/templates/fullstack-app/src/pages/_error.d.ts +4 -0
- package/templates/fullstack-app/src/pages/_error.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/_error.js +8 -0
- package/templates/fullstack-app/src/pages/about/index.d.ts +5 -0
- package/templates/fullstack-app/src/pages/about/index.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/about/index.js +6 -0
- package/templates/fullstack-app/src/pages/about.d.ts +10 -0
- package/templates/fullstack-app/src/pages/about.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/about.js +21 -0
- package/templates/fullstack-app/src/pages/api/users/[id].d.ts +6 -0
- package/templates/fullstack-app/src/pages/api/users/[id].d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/api/users/[id].js +51 -0
- package/templates/fullstack-app/src/pages/api/users/index.d.ts +4 -0
- package/templates/fullstack-app/src/pages/api/users/index.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/api/users/index.js +33 -0
- package/templates/fullstack-app/src/pages/index.d.ts +21 -0
- package/templates/fullstack-app/src/pages/index.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/index.js +66 -0
- package/templates/fullstack-app/src/pages/users/[id].d.ts +38 -0
- package/templates/fullstack-app/src/pages/users/[id].d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/users/[id].js +79 -0
- package/templates/fullstack-app/src/pages/users.d.ts +14 -0
- package/templates/fullstack-app/src/pages/users.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/users.js +14 -0
- package/templates/fullstack-app/src/pages/wasm-demo.d.ts +1 -0
- package/templates/fullstack-app/src/pages/wasm-demo.d.ts.map +1 -0
- package/templates/fullstack-app/src/pages/wasm-demo.js +2 -0
- package/templates/fullstack-app/src/router.d.ts +22 -0
- package/templates/fullstack-app/src/router.d.ts.map +1 -0
- package/templates/fullstack-app/src/router.js +210 -0
- package/templates/fullstack-app/tailwind.config.d.ts +3 -0
- package/templates/fullstack-app/tailwind.config.d.ts.map +1 -0
- package/templates/fullstack-app/vite.config.d.ts +3 -0
- package/templates/fullstack-app/vite.config.d.ts.map +1 -0
- package/templates/ssr-template/dist/client/assets/main-D-VH3xOb.d.ts +2 -0
- package/templates/ssr-template/dist/client/assets/main-D-VH3xOb.d.ts.map +1 -0
- package/templates/ssr-template/dist/client.d.ts +85 -0
- package/templates/ssr-template/dist/client.d.ts.map +1 -0
- package/templates/ssr-template/dist/server.d.ts +2 -0
- package/templates/ssr-template/dist/server.d.ts.map +1 -0
- package/templates/ssr-template/esbuild.config.d.ts +2 -0
- package/templates/ssr-template/esbuild.config.d.ts.map +1 -0
- package/templates/ssr-template/jsx-shim.d.ts +2 -0
- package/templates/ssr-template/jsx-shim.d.ts.map +1 -0
- package/templates/ssr-template/src/App.d.ts +2 -0
- package/templates/ssr-template/src/App.d.ts.map +1 -0
- package/templates/ssr-template/src/App.js +625 -0
- package/templates/ssr-template/src/App.tsx +43 -18
- package/templates/ssr-template/src/client.d.ts +2 -0
- package/templates/ssr-template/src/client.d.ts.map +1 -0
- package/templates/ssr-template/src/client.js +3 -0
- package/templates/ssr-template/src/server.d.ts +2 -0
- package/templates/ssr-template/src/server.d.ts.map +1 -0
- package/templates/ssr-template/src/server.js +29 -0
- package/templates/ssr-template/vite.config.d.ts +3 -0
- package/templates/ssr-template/vite.config.d.ts.map +1 -0
- package/templates/ssr-template/vite.config.js +30 -0
- package/templates/wasm/build-wasm.d.ts +2 -0
- package/templates/wasm/build-wasm.d.ts.map +1 -0
- package/templates/wasm/dist/assets/index-BNqTDBdE.d.ts +30 -0
- package/templates/wasm/dist/assets/index-BNqTDBdE.d.ts.map +1 -0
- package/templates/wasm/dist/wasm_exec.d.ts +1 -0
- package/templates/wasm/dist/wasm_exec.d.ts.map +1 -0
- package/templates/wasm/esbuild.config.d.ts +2 -0
- package/templates/wasm/esbuild.config.d.ts.map +1 -0
- package/templates/wasm/go/wasm_exec.d.ts +1 -0
- package/templates/wasm/go/wasm_exec.d.ts.map +1 -0
- package/templates/wasm/jsx-shim.d.ts +5 -0
- package/templates/wasm/jsx-shim.d.ts.map +1 -0
- package/templates/wasm/public/wasm_exec.d.ts +1 -0
- package/templates/wasm/public/wasm_exec.d.ts.map +1 -0
- package/templates/wasm/src/App.d.ts +2 -0
- package/templates/wasm/src/App.d.ts.map +1 -0
- package/templates/wasm/src/App.js +381 -0
- package/templates/wasm/src/client.d.ts +2 -0
- package/templates/wasm/src/client.d.ts.map +1 -0
- package/templates/wasm/src/client.js +210 -0
- package/templates/wasm/src/index.d.ts +2 -0
- package/templates/wasm/src/index.d.ts.map +1 -0
- package/templates/wasm/src/index.js +20 -0
- package/templates/wasm/src/server.d.ts +2 -0
- package/templates/wasm/src/server.d.ts.map +1 -0
- package/templates/wasm/src/server.js +131 -0
- package/templates/wasm/vite.config.d.ts +3 -0
- package/templates/wasm/vite.config.d.ts.map +1 -0
- package/templates/wasm/vite.config.js +36 -0
- package/templates/wasm/wasm-loader.d.ts +6 -0
- package/templates/wasm/wasm-loader.d.ts.map +1 -0
- package/dist/renderer-BL3gq8cW.cjs +0 -2
- package/dist/renderer-BL3gq8cW.cjs.map +0 -1
- package/dist/renderer-Dyy-o05F.js +0 -52
- package/dist/renderer-Dyy-o05F.js.map +0 -1
- package/dist/server-renderer-C1WXH-zV.js.map +0 -1
- package/dist/server-renderer-Chs-nmJm.cjs +0 -2
- package/dist/server-renderer-Chs-nmJm.cjs.map +0 -1
@@ -0,0 +1,190 @@
|
|
1
|
+
import * as esbuild from 'esbuild';
|
2
|
+
import path from 'path';
|
3
|
+
import fs from 'fs/promises';
|
4
|
+
import { fileURLToPath } from 'url';
|
5
|
+
import { existsSync } from 'fs';
|
6
|
+
import postcss from 'postcss';
|
7
|
+
import tailwindcss from 'tailwindcss';
|
8
|
+
import autoprefixer from 'autoprefixer';
|
9
|
+
// Get __dirname equivalent in ESM
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
11
|
+
const __dirname = path.dirname(__filename);
|
12
|
+
// Build configuration
|
13
|
+
const clientEntry = path.join(__dirname, 'src', 'main.tsx');
|
14
|
+
const serverEntry = path.join(__dirname, 'server.ts');
|
15
|
+
const outdir = path.join(__dirname, 'dist');
|
16
|
+
// Ensure output directory exists
|
17
|
+
if (!existsSync(outdir)) {
|
18
|
+
await fs.mkdir(outdir, { recursive: true });
|
19
|
+
}
|
20
|
+
// CSS processing plugin for esbuild
|
21
|
+
const cssPlugin = {
|
22
|
+
name: 'css-processor',
|
23
|
+
setup(build) {
|
24
|
+
// Handle CSS files
|
25
|
+
build.onLoad({ filter: /\.css$/ }, async (args) => {
|
26
|
+
// Read the CSS file
|
27
|
+
const css = await fs.readFile(args.path, 'utf8');
|
28
|
+
// Process with PostCSS (Tailwind + Autoprefixer)
|
29
|
+
try {
|
30
|
+
const result = await postcss([
|
31
|
+
tailwindcss,
|
32
|
+
autoprefixer
|
33
|
+
]).process(css, {
|
34
|
+
from: args.path,
|
35
|
+
to: path.join(outdir, 'build', 'styles.css')
|
36
|
+
});
|
37
|
+
// Return processed CSS
|
38
|
+
return {
|
39
|
+
contents: result.css,
|
40
|
+
loader: 'css'
|
41
|
+
};
|
42
|
+
}
|
43
|
+
catch (error) {
|
44
|
+
console.error('Error processing CSS:', error);
|
45
|
+
return {
|
46
|
+
errors: [{ text: 'Error processing CSS with PostCSS: ' + error.message }],
|
47
|
+
loader: 'css'
|
48
|
+
};
|
49
|
+
}
|
50
|
+
});
|
51
|
+
}
|
52
|
+
};
|
53
|
+
// Copy static files
|
54
|
+
async function copyPublicFiles() {
|
55
|
+
const publicDir = path.join(__dirname, 'public');
|
56
|
+
const publicOutDir = path.join(outdir, 'public');
|
57
|
+
if (existsSync(publicDir)) {
|
58
|
+
if (!existsSync(publicOutDir)) {
|
59
|
+
await fs.mkdir(publicOutDir, { recursive: true });
|
60
|
+
}
|
61
|
+
// Read all files in public directory
|
62
|
+
const files = await fs.readdir(publicDir, { withFileTypes: true });
|
63
|
+
// Copy each file
|
64
|
+
for (const file of files) {
|
65
|
+
const srcPath = path.join(publicDir, file.name);
|
66
|
+
const destPath = path.join(publicOutDir, file.name);
|
67
|
+
if (file.isDirectory()) {
|
68
|
+
// Copy directory recursively
|
69
|
+
await fs.cp(srcPath, destPath, { recursive: true });
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
// Copy file
|
73
|
+
await fs.copyFile(srcPath, destPath);
|
74
|
+
}
|
75
|
+
}
|
76
|
+
console.log('✓ Public files copied to dist/public');
|
77
|
+
}
|
78
|
+
// Copy index.html
|
79
|
+
const indexPath = path.join(__dirname, 'index.html');
|
80
|
+
if (existsSync(indexPath)) {
|
81
|
+
await fs.copyFile(indexPath, path.join(outdir, 'index.html'));
|
82
|
+
console.log('✓ index.html copied to dist');
|
83
|
+
}
|
84
|
+
}
|
85
|
+
// Build client-side code
|
86
|
+
async function buildClient() {
|
87
|
+
console.log('Building client...');
|
88
|
+
try {
|
89
|
+
await esbuild.build({
|
90
|
+
entryPoints: [clientEntry],
|
91
|
+
bundle: true,
|
92
|
+
minify: true,
|
93
|
+
format: 'esm',
|
94
|
+
outfile: path.join(outdir, 'build', 'main.js'),
|
95
|
+
jsx: 'automatic',
|
96
|
+
jsxFactory: 'jsx',
|
97
|
+
jsxFragment: 'Fragment',
|
98
|
+
plugins: [
|
99
|
+
{
|
100
|
+
name: 'jsx-runtime-import',
|
101
|
+
setup(build) {
|
102
|
+
build.onLoad({ filter: /\.(tsx|jsx)$/ }, async (args) => {
|
103
|
+
const source = await fs.readFile(args.path, 'utf8');
|
104
|
+
const content = `import { jsx, Fragment } from 'frontend-hamroun';\n${source}`;
|
105
|
+
return { contents: content, loader: args.path.endsWith('tsx') ? 'tsx' : 'jsx' };
|
106
|
+
});
|
107
|
+
}
|
108
|
+
}
|
109
|
+
],
|
110
|
+
loader: {
|
111
|
+
'.tsx': 'tsx',
|
112
|
+
'.ts': 'ts',
|
113
|
+
'.jsx': 'jsx',
|
114
|
+
'.js': 'js',
|
115
|
+
'.css': 'css',
|
116
|
+
'.json': 'json',
|
117
|
+
'.png': 'file',
|
118
|
+
'.jpg': 'file',
|
119
|
+
'.svg': 'file'
|
120
|
+
},
|
121
|
+
define: {
|
122
|
+
'process.env.NODE_ENV': '"production"'
|
123
|
+
},
|
124
|
+
sourcemap: false,
|
125
|
+
metafile: true
|
126
|
+
});
|
127
|
+
console.log('✓ Client build complete');
|
128
|
+
}
|
129
|
+
catch (error) {
|
130
|
+
console.error('Client build failed:', error);
|
131
|
+
process.exit(1);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
// Build server-side code
|
135
|
+
async function buildServer() {
|
136
|
+
console.log('Building server...');
|
137
|
+
try {
|
138
|
+
await esbuild.build({
|
139
|
+
entryPoints: [serverEntry],
|
140
|
+
bundle: true,
|
141
|
+
platform: 'node',
|
142
|
+
target: ['node16'],
|
143
|
+
outfile: path.join(outdir, 'server.js'),
|
144
|
+
format: 'esm',
|
145
|
+
jsx: 'automatic',
|
146
|
+
jsxFactory: 'jsx',
|
147
|
+
jsxFragment: 'Fragment',
|
148
|
+
plugins: [{
|
149
|
+
name: 'external-modules',
|
150
|
+
setup(build) {
|
151
|
+
// Mark node_modules as external to reduce bundle size
|
152
|
+
build.onResolve({ filter: /^[^./]/ }, args => {
|
153
|
+
return { external: true };
|
154
|
+
});
|
155
|
+
}
|
156
|
+
}],
|
157
|
+
define: {
|
158
|
+
'process.env.NODE_ENV': '"production"'
|
159
|
+
},
|
160
|
+
sourcemap: false
|
161
|
+
});
|
162
|
+
console.log('✓ Server build complete');
|
163
|
+
}
|
164
|
+
catch (error) {
|
165
|
+
console.error('Server build failed:', error);
|
166
|
+
process.exit(1);
|
167
|
+
}
|
168
|
+
}
|
169
|
+
// Run the build process
|
170
|
+
async function build() {
|
171
|
+
console.log('🔨 Starting production build...');
|
172
|
+
// Create build directory for client assets
|
173
|
+
const buildDir = path.join(outdir, 'build');
|
174
|
+
if (!existsSync(buildDir)) {
|
175
|
+
await fs.mkdir(buildDir, { recursive: true });
|
176
|
+
}
|
177
|
+
// Run build steps in parallel
|
178
|
+
await Promise.all([
|
179
|
+
copyPublicFiles(),
|
180
|
+
buildClient(),
|
181
|
+
buildServer()
|
182
|
+
]);
|
183
|
+
console.log('✅ Production build complete!');
|
184
|
+
console.log(`Run 'npm run serve' to start the production server.`);
|
185
|
+
}
|
186
|
+
// Execute the build
|
187
|
+
build().catch(error => {
|
188
|
+
console.error('Build failed:', error);
|
189
|
+
process.exit(1);
|
190
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"postcss.config.d.ts","sourceRoot":"","sources":["postcss.config.js"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"process-tailwind.d.ts","sourceRoot":"","sources":["process-tailwind.js"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=route-handler.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"route-handler.d.ts","sourceRoot":"","sources":["route-handler.js"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["server.ts"],"names":[],"mappings":""}
|