@ -4,11 +4,11 @@ import { log } from "../lib/logging.js";
export const BANDO _GIT = "https://git.learnjsthehardway.com/learn-javascript-the-hard-way/bandolier-template.git" ;
export const BANDO _GIT = "https://git.learnjsthehardway.com/learn-javascript-the-hard-way/bandolier-template.git" ;
export const description = "Test command ." ;
export const description = "Installs demo/template repositories for the Bandolier project of Learn JavaScript the Hard Way ." ;
export const options = [
export const options = [
[ "--repo" , "repository to dupe and setup" , BANDO _GIT ] ,
[ "--repo" , "repository to dupe and setup" , BANDO _GIT ] ,
[ "--template" , "templates directory to use for setups" , "commands/templates" ]
[ "--template" , "templates directory to use for setups" , "./ commands/templates" ]
] ;
] ;
export const argument = [ "<target>" , "name of the project" ] ;
export const argument = [ "<target>" , "name of the project" ] ;
@ -23,7 +23,7 @@ export const main = async (target, opts) => {
process . exit ( 1 ) ;
process . exit ( 1 ) ;
} catch ( error ) {
} catch ( error ) {
// access is stupid, it throws an exception but we want the negative response as a positive outcome
// access is stupid, it throws an exception but we want the negative response as a positive outcome
exec _i ( ` git clone --depth 1 ${ BANDO _GIT } ${ target } --template= ${ opts . template } ` ) ;
exec _i ( ` git clone --depth 1 ${ BANDO _GIT } ${ target } ` ) ;
process . exit ( 0 ) ;
process . exit ( 0 ) ;
}
}
}
}