diff --git a/commands/create.js b/commands/create.js index e30b56c..84cd893 100644 --- a/commands/create.js +++ b/commands/create.js @@ -9,7 +9,8 @@ export const description = "Generates projects using the Bandolier educational f export const options = [ ["--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"], + ["--keep-git", "for patches and analysis, you can keep the original .git", false], ]; export const argument = ["", "name of the project directory (must not exist)"]; @@ -40,4 +41,11 @@ export const main = async (target, opts) => { copy(f_normal, copy_to); // we can add a template thing here log.debug(`${f_normal} ---> ${copy_to}`); } + + // remove the .git directory + if(opts.keepGit) { + log.warn("Keeping the .git directory, so be sure to delete it if you want to do your own work."); + } else { + exec_i(`rm -rf ${path.join(target, ".git")}`); + } } diff --git a/package-lock.json b/package-lock.json index 84d3a59..068073d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ljsthw-bandolier", - "version": "0.1.2", + "version": "0.1.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ljsthw-bandolier", - "version": "0.1.2", + "version": "0.1.4", "license": "All Rights Reserved", "dependencies": { "commander": "^9.4.1", diff --git a/package.json b/package.json index dbf64b5..b72da5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ljsthw-bandolier", - "version": "0.1.4", + "version": "0.3.0", "description": "Generates projects using the Bandolier educational framework.", "main": "bando.js", "bin": {