feat: initialize pnpm workspace and add app structure
- Created pnpm workspace configuration in `pnpm-workspace.yaml`. - Implemented basic app setup in `src/app.ts` using `@kevisual/router`. - Generated documentation files in `src/generated/docs.ts` for showcase CMS templates. - Added inline script to read and compile markdown files into TypeScript constants in `src/inline.ts`. - Set up main application entry point in `src/main.ts` to integrate routing and plugins. - Established routing structure in `src/routes/index.ts` and `src/routes/md.ts` for handling markdown-related tasks. - Implemented a route for initializing web todo tasks with dynamic content generation based on selected template type.
This commit is contained in:
24
bun.config.ts
Normal file
24
bun.config.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import path from 'node:path';
|
||||
import pkg from './package.json';
|
||||
import fs from 'node:fs';
|
||||
import { execSync } from 'node:child_process';
|
||||
const w = (p: string) => path.resolve(import.meta.dir, p);
|
||||
|
||||
const external: string[] = ["bun"];
|
||||
await Bun.build({
|
||||
target: 'node',
|
||||
format: 'esm',
|
||||
entrypoints: [w('./src/main.ts')],
|
||||
outdir: w('./dist'),
|
||||
naming: {
|
||||
entry: 'app.js',
|
||||
},
|
||||
define: {},
|
||||
external
|
||||
});
|
||||
|
||||
const cmd = 'dts -i ./src/main.ts -o /app.d.ts';
|
||||
|
||||
execSync(cmd, { stdio: 'inherit' });
|
||||
|
||||
// Copy package.json to dist
|
||||
Reference in New Issue
Block a user