sajt/index.js

30 lines
678 B
JavaScript
Raw Normal View History

2024-10-11 11:11:40 +02:00
import { Command } from 'commander'
import chalk from 'chalk'
import fs from 'fs-extra'
import path from 'path'
2024-10-17 23:51:03 +02:00
import { newProject, buildProject, appProject } from './project.js'
import { serve } from './serve.js'
2024-08-15 19:52:42 +02:00
2024-10-11 11:11:40 +02:00
const program = new Command()
program
.command('init')
.description('Initialize project in the current directory with the default theme')
.action(newProject)
2024-10-17 23:51:03 +02:00
program
2024-10-11 11:11:40 +02:00
.command('build')
.description('Build the webpage')
2024-10-17 23:51:03 +02:00
.action(buildProject)
program
.command('serve')
.description('Run the website locally')
.action(serve)
program
.command('app')
.description('Run notes as the the app')
.action(appProject)
2024-10-11 11:11:40 +02:00
program.parse(process.argv)