15 lines
454 B
TypeScript
15 lines
454 B
TypeScript
import type { CommandHandler } from '../types.js';
|
|
|
|
export const compileCommand: CommandHandler = async (dir, options) => {
|
|
console.log(`开始编译...`);
|
|
console.log(`目录:${dir}`);
|
|
console.log(`输出目录:${options.output}`);
|
|
|
|
// TODO: 实现编译逻辑
|
|
// 1. 扫描目录下的所有 .md 文件
|
|
// 2. 解析 markdown 并生成路由
|
|
// 3. 打包为带 hash 路由的单个 HTML 入口
|
|
|
|
console.log('编译完成!');
|
|
};
|