src/modules/render.js
/**
 * Performs the actual rendering of the template and output
 */
Performs the actual rendering of the template and output
Performs the actual rendering of the template and output
function perform (template, data, engine, output, dataDir) {
  store(dataDir).render({
    template,
    data: Object.assign({}, { env: process.env }, data),
    engine
  })
    .then(tmpl => {
      output.write(tmpl)
    })
    .catch(err => {
      console.log(`${pkg.shortname}: Error rendering template`)
      console.log(`See '${pkg.shortname} render --help'`)
      return err
    })
}
function perform ( template , data , engine , output , dataDir ) { store ( dataDir ) . render ( { template , data : Object . assign ( { } , { env : process . env } , data ) , engine } ) . then ( tmpl => { output . write ( tmpl ) } ) . catch ( err => { console . log ( ` ${ pkg . shortname } ` ) console . log ( ` ${ pkg . shortname } ` ) return err } ) }
Performs the actual rendering of the template and output
Performs the actual rendering of the template and output