@@ -25,7 +25,7 @@ type BuildArgs = {
2525markdown :string ;
2626yaml :string ;
2727output :string ;
28- noValidate :boolean ;
28+ validate :boolean ;
2929} ;
3030
3131async function build ( args :string [ ] ) {
@@ -42,8 +42,9 @@ async function build(args: string[]) {
4242// -o --output - default coderoad.json
4343const output =
4444getArg ( args , { name :"output" , alias :"o" } ) || "tutorial.json" ;
45- const noValidate =
46- getArg ( args , { name :"no-validate" , alias :"nv" } ) !== "false" ;
45+ const validate = getArg ( args , { name :"validate" , alias :"v" } ) !== "false" ;
46+
47+ console . log ( "validate" , validate ) ;
4748
4849console . log ( `Building CodeRoad${ output } ...` ) ;
4950
@@ -52,7 +53,7 @@ async function build(args: string[]) {
5253 output,
5354 markdown,
5455 yaml,
55- noValidate ,
56+ validate ,
5657} ;
5758} catch ( e ) {
5859console . error ( "Error parsing build logs" ) ;
@@ -143,13 +144,13 @@ async function build(args: string[]) {
143144
144145// validate tutorial based on tutorial json schema
145146try {
146- if ( ! options . noValidate ) {
147+ if ( options . validate ) {
147148const valid = validateSchema ( tutorialSchema , tutorial ) ;
148149if ( ! valid ) {
149150console . error (
150151"Tutorial validation failed. See above to see what to fix"
151152) ;
152- return ;
153+ // continue rather than exiting early
153154}
154155}
155156} catch ( e ) {