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

Feature/no validate build#53

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 3 commits intomasterfromfeature/no-validate-build
Jun 27, 2020
Merged
Changes from1 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
NextNext commit
no-validate
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
@ShMcK
ShMcK committedJun 25, 2020
commit316b0354dc51aef70d1e2aca5af47a0e7fe21873
16 changes: 12 additions & 4 deletionssrc/build.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,7 @@ type BuildArgs = {
markdown: string;
yaml: string;
output: string;
noValidate: boolean;
};

async function build(args: string[]) {
Expand All@@ -41,6 +42,8 @@ async function build(args: string[]) {
// -o --output - default coderoad.json
const output =
getArg(args, { name: "output", alias: "o" }) || "tutorial.json";
const noValidate =
getArg(args, { name: "no-validate", alias: "nv" }) !== "false";

console.log(`Building CodeRoad ${output}...`);

Expand All@@ -49,6 +52,7 @@ async function build(args: string[]) {
output,
markdown,
yaml,
noValidate,
};
} catch (e) {
console.error("Error parsing build logs");
Expand DownExpand Up@@ -139,10 +143,14 @@ async function build(args: string[]) {

// validate tutorial based on tutorial json schema
try {
const valid = validateSchema(tutorialSchema, tutorial);
if (!valid) {
console.error("Tutorial validation failed. See above to see what to fix");
return;
if (!options.noValidate) {
const valid = validateSchema(tutorialSchema, tutorial);
if (!valid) {
console.error(
"Tutorial validation failed. See above to see what to fix"
);
return;
}
}
} catch (e) {
console.error("Error validating tutorial schema:");
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp