Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaeaab0b

Browse files
committed
fix build for ts
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent70ce3f4 commitaeaab0b

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

‎src/build.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
importsimpleGitfrom"simple-git/promise";
21
import*asyamlParserfrom"js-yaml";
32
import*aspathfrom"path";
43
import*as_from"lodash";
54
import*asfsfrom"fs";
65
import*asTfrom"../typings/tutorial";
76
// import validate from './validator';
87

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

1113
typeTutorialContent={};
@@ -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
constmdContent:any=parseContent(_mdContent);
176178

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

‎src/cli.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import*asinquirerfrom"inquirer";
2-
importsimpleGitfrom"simple-git/promise";
32
import*asfsfrom"fs";
43
import*asTfrom"../typings/tutorial";
54
importbuild,{BuildOptions}from"./build";
65
importcreatefrom"./create";
76

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

1111
typeQ=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
constoptions:BuildOptions=awaitpromptForMissingOptions(parsedArgs);
172-
console.log(options);
173171
consttutorial:T.Tutorial=awaitbuild(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)

[8]ページ先頭

©2009-2025 Movatter.jp