Skip to content

Convert/typescript #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 30, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix build for ts
Signed-off-by: shmck <[email protected]>
  • Loading branch information
ShMcK committed May 30, 2020
commit aeaab0bf6967232610a5f1426dc84f0584a9d35d
6 changes: 3 additions & 3 deletions src/build.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import simpleGit from "simple-git/promise";
import * as yamlParser from "js-yaml";
import * as path from "path";
import * as _ from "lodash";
import * as fs from "fs";
import * as T from "../typings/tutorial";
// import validate from './validator';

// import not working
const simpleGit = require("simple-git/promise");

const workingDir = "tmp";

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

console.log(mdContent);

// Parse tutorial to JSON
const tutorial: T.Tutorial = yamlParser.load(_tutorial);

Expand Down
5 changes: 1 addition & 4 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as inquirer from "inquirer";
import simpleGit from "simple-git/promise";
import * as fs from "fs";
import * as T from "../typings/tutorial";
import build, { BuildOptions } from "./build";
import create from "./create";

// import not working
const arg = require("arg");
const simpleGit = require("simple-git/promise");

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

Expand Down Expand Up @@ -51,7 +51,6 @@ function parseArgumentsIntoOptions(rawArgs: string[]): ParsedArgs {
argv: rawArgs.slice(2),
}
);
console.log(args);
return {
command: args["_"][0],
git: args["--git"],
Expand Down Expand Up @@ -169,7 +168,6 @@ export async function cli(args: string[]): Promise<void> {
case "build":
// Otherwise, continue with the other options
const options: BuildOptions = await promptForMissingOptions(parsedArgs);
console.log(options);
const tutorial: T.Tutorial = await build(options);

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

case "create":
console.log("here");
create(process.cwd());
break;
}
Expand Down