Skip to content

Commit

Permalink
update package
Browse files Browse the repository at this point in the history
  • Loading branch information
niltor committed Jul 31, 2024
1 parent ff6cc14 commit 0fd7d1c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/NodePackage/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
#!/usr/bin/env node
import dotnet from 'node-api-dotnet';
import { Command } from "commander";
import "./bin/BuildSite.js";


const Cmd = dotnet.BuildSite.Command;

const program = new Command();

program.name('ezblog')
.description('Generates a pure static blog website from a markdown document');

program.command('init')
.description('')
.action(() => {
console.log('init');
.description('初始化webinfo.json配置文件')
.argument('[path]', '目录')
.action((path) => {
if (path == null) {
path = ''
}
Cmd.Init(path);
});


Expand All @@ -20,7 +27,7 @@ program.command('build <source> <output>')
.argument('<source>', 'markdown文件目录')
.argument('<output>', '站点输出目录')
.action((source, output) => {

Cmd.Build(source, output);
});

program
Expand Down
1 change: 1 addition & 0 deletions src/NodePackage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"readme": "README.md",
"author": "NilTor",
"license": "MIT",
"type": "module",
"dependencies": {
"commander": "^12.1.0",
"node-api-dotnet": "^0.7.34"
Expand Down

0 comments on commit 0fd7d1c

Please sign in to comment.