complete basic cli

This commit is contained in:
2020-01-15 14:09:29 +01:00
parent 2d400f18ff
commit 709ab6ea35
3 changed files with 42 additions and 9 deletions

View File

@ -7,9 +7,8 @@ const path = require ('path');
* copies the full template to the current folder
*
* @param {string} folder folder to run in
* @param {Array} args function arguments
*/
function run (folder, args) {
function run (folder) {
const template = path.join (__dirname, 'template');
fs.copy (template, folder);
}
@ -18,10 +17,9 @@ function run (folder, args) {
* checks if the arguments meet the requirements
*
* @param {string} folder folder to run in
* @param {Array} args function arguments
* @returns {boolean} true if arguments match requirements
*/
function assert (folder, args) {
function assert (folder) {
return (typeof folder === 'string')
&& (fs.existsSync (folder));
}