src/GenerateTemplate.js
/**
 * Initiates the process of template generation. Calls copyFileContents.
 * to create a copy of file at destination path.
 * @param {string} src - source directory path.
 * @param {string} dest - destination directory path.
 */
Initiates the process of template generation.
Initiates the process of template generation .
function generateTemplate(src, dest) {
  try {
    const files = fs.readdirSync(src, {
      encoding: "utf-8",
      withFileTypes: true,
    });
    files.forEach((f) => {
      copyFilecontents(f, src, dest);
    });
  } catch (error) {
    console.log(chalk.bgRed(`Error generating template`));
    console.log();
  }
  return;
}
function generateTemplate ( src , dest ) { try { const files = fs . readdirSync ( src , { encoding : "utf-8" , withFileTypes : true , } ) ; files . forEach ( ( f ) => { copyFilecontents ( f , src , dest ) ; } ) ; } catch ( error ) { console . log ( chalk . bgRed ( ` ` ) ) ; console . log ( ) ; } return ; }
Initiates the process of template generation.
Initiates the process of template generation .