diff --git a/index.js b/index.js index 21bc82ed..66f2c58b 100755 --- a/index.js +++ b/index.js @@ -29,7 +29,7 @@ program program .command('new ') - .option('-s, --scaffold ', 'The framework to use. Options include react, angular, vuejs, nextjs and node.') + .option('-s, --scaffold ', 'The framework to use. Options include android, react, angular, vuejs, nextjs and node.') .option('-r, --restURL ', 'The rest URL to use. default: https://rest.bitbox.earth/v1/') .option('-e, --environment ', 'environment of running BITBOX instance. Ex: production, staging. (Default: development)') .description(`create a new BITBOX application`) @@ -70,6 +70,8 @@ program repo = 'https://github.com/Bitcoin-com/bitbox-scaffold-react.git'; } else if(scaffold === 'vue') { repo = 'https://github.com/Bitcoin-com/bitbox-scaffold-vue.git'; + } else if(scaffold === 'android') { + repo = 'https://github.com/taherdhanera/bitbox-scaffold-android.git'; } else { console.log(chalk.red(`Scaffold ${scaffold} not supported`)); process.exit(1) diff --git a/test/CLI.js b/test/CLI.js new file mode 100644 index 00000000..edfb5237 --- /dev/null +++ b/test/CLI.js @@ -0,0 +1,13 @@ +let assert = require("assert"); +let fs = require("fs"); + +describe("CLI scaffolds", () => { + it("documents and maps the android scaffold", () => { + const source = fs.readFileSync("index.js", "utf8"); + + assert(source.includes("Options include android, react, angular, vuejs, nextjs and node.")); + assert(source.includes("scaffold === 'android'")); + assert(source.includes("https://github.com/taherdhanera/bitbox-scaffold-android.git")); + }); +}); +