Merge pull request #13 from transitive-bullshit/feature/es5-support
transpile to es5 for node >= 4 support
This commit is contained in:
parent
288d18f616
commit
519cd7ea8e
6 changed files with 1403 additions and 94 deletions
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const consolidate = require('consolidate')
|
||||
const handlebars = require('handlebars')
|
||||
const execa = require('execa')
|
||||
const fs = require('fs')
|
||||
const globby = require('globby')
|
||||
|
@ -70,7 +70,8 @@ module.exports.copyTemplateFile = async (opts) => {
|
|||
const destFilePath = path.join(dest, fileRelativePath)
|
||||
const destFileDir = path.parse(destFilePath).dir
|
||||
|
||||
const content = await consolidate.handlebars(file, {
|
||||
const template = handlebars.compile(fs.readFileSync(file, 'utf8'))
|
||||
const content = template({
|
||||
...info,
|
||||
yarn: (info.manager === 'yarn')
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue