Use typescript for the project

This commit is contained in:
Artur Gurgul 2025-02-24 18:46:31 +01:00
parent 0f1d41a991
commit 83fd79f674
24 changed files with 2882 additions and 115 deletions

30
src/index.ts Normal file
View file

@ -0,0 +1,30 @@
import { Command } from 'commander'
import chalk from 'chalk'
//import fs from 'fs-extra'
import path from 'path'
import { newProject, buildProject, appProject } from './project.js'
import { serve } from './serve.js'
const program = new Command()
program
.command('init')
.description('Initialize project in the current directory with the default theme')
.action(newProject)
program
.command('build')
.description('Build the webpage')
.action(buildProject)
program
.command('serve')
.description('Run the website locally')
.action(serve)
program
.command('app')
.description('Run notes as the the app')
.action(appProject)
program.parse(process.argv)