Skip to content

Commit

Permalink
feat(cli): init
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-n-o-M committed Jan 4, 2023
1 parent 706d139 commit a27f98c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cli/CodefendCLI.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Command, OptionValues } from "commander";
import { version } from "../../package.json";
import { ICodefendCLI } from "./ICodefendCLI";
import { fileSystem, codefendDefaultOptions } from "..";
export class CodefendCLI implements ICodefendCLI {
async start() {
const program = this.buildCommand();
Expand Down Expand Up @@ -53,6 +54,10 @@ export class CodefendCLI implements ICodefendCLI {
async executeInitCommand() {
console.log("Creating .codefendrc.json...");
await this.delay(500);
await fileSystem.fileWriter.writeFile(
"./.codefendrc.json",
JSON.stringify(codefendDefaultOptions, null, 4)
);
console.log(
"Initialization completed. .codefendrc.json has been generated."
);
Expand Down

0 comments on commit a27f98c

Please sign in to comment.