Skip to content

Commit aeaab0b

Browse files
committed
fix build for ts
Signed-off-by: shmck <[email protected]>
1 parent 70ce3f4 commit aeaab0b

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/build.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import simpleGit from "simple-git/promise";
21
import * as yamlParser from "js-yaml";
32
import * as path from "path";
43
import * as _ from "lodash";
54
import * as fs from "fs";
65
import * as T from "../typings/tutorial";
76
// import validate from './validator';
87

8+
// import not working
9+
const simpleGit = require("simple-git/promise");
10+
911
const workingDir = "tmp";
1012

1113
type TutorialContent = {};
@@ -174,8 +176,6 @@ async function build({ repo, codeBranch, setupBranch, isLocal }: BuildOptions) {
174176
// Add one more line to the content as per Shawn's request
175177
const mdContent: any = parseContent(_mdContent);
176178

177-
console.log(mdContent);
178-
179179
// Parse tutorial to JSON
180180
const tutorial: T.Tutorial = yamlParser.load(_tutorial);
181181

src/cli.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import * as inquirer from "inquirer";
2-
import simpleGit from "simple-git/promise";
32
import * as fs from "fs";
43
import * as T from "../typings/tutorial";
54
import build, { BuildOptions } from "./build";
65
import create from "./create";
76

87
// import not working
98
const arg = require("arg");
9+
const simpleGit = require("simple-git/promise");
1010

1111
type Q = inquirer.Question<any> & { choices?: string[] };
1212

@@ -51,7 +51,6 @@ function parseArgumentsIntoOptions(rawArgs: string[]): ParsedArgs {
5151
argv: rawArgs.slice(2),
5252
}
5353
);
54-
console.log(args);
5554
return {
5655
command: args["_"][0],
5756
git: args["--git"],
@@ -169,7 +168,6 @@ export async function cli(args: string[]): Promise<void> {
169168
case "build":
170169
// Otherwise, continue with the other options
171170
const options: BuildOptions = await promptForMissingOptions(parsedArgs);
172-
console.log(options);
173171
const tutorial: T.Tutorial = await build(options);
174172

175173
if (tutorial) {
@@ -182,7 +180,6 @@ export async function cli(args: string[]): Promise<void> {
182180
break;
183181

184182
case "create":
185-
console.log("here");
186183
create(process.cwd());
187184
break;
188185
}

0 commit comments

Comments
 (0)