bin/ease-init.js
/**
 * Check, download and generate the project.
 */
Check, download and generate the project.
Check download and generate the project .
function run () {
  if (isLocalPath(template)) {
    let templatePath = getTemplatePath(template)
    if (exists(templatePath)) {
      generate(name, templatePath, to, function (err) {
        if (err) logger.fatal(err)
        console.log()
        logger.success('Generated "%s".', name)
      })
    } else {
      logger.fatal('Local template "%s" not found.', template)
    }
  } else {
    if (!hasSlash) {
      let officialTemplate = 'ease-templates/' + template
      downloadAndGenerate(officialTemplate)
    } else {
      downloadAndGenerate(template)
    }
  }
}
function run ( ) { if ( isLocalPath ( template ) ) { let templatePath = getTemplatePath ( template ) if ( exists ( templatePath ) ) { generate ( name , templatePath , to , function ( err ) { if ( err ) logger . fatal ( err ) console . log ( ) logger . success ( 'Generated "%s".' , name ) } ) } else { logger . fatal ( 'Local template "%s" not found.' , template ) } } else { if ( ! hasSlash ) { let officialTemplate = 'ease-templates/' + template downloadAndGenerate ( officialTemplate ) } else { downloadAndGenerate ( template ) } } }
Check, download and generate the project.
Check download and generate the project .
// check if template is local // use official templates