chore(package): re-init package with commitizen and standard-release

This commit is contained in:
Pavel Pertsev
2018-05-16 12:54:46 +03:00
parent cb4e7a5643
commit eaf2328575
10640 changed files with 609660 additions and 117 deletions

View File

@@ -0,0 +1,39 @@
'use strict'
const Q = require(`q`)
const readFile = Q.denodeify(require(`fs`).readFile)
const resolve = require(`path`).resolve
module.exports = Q.all([
readFile(resolve(__dirname, './templates/template.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/header.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/commit.hbs'), 'utf-8')
])
.spread((template, header, commit) => {
const writerOpts = getWriterOpts()
writerOpts.mainTemplate = template
writerOpts.headerPartial = header
writerOpts.commitPartial = commit
return writerOpts
})
function getWriterOpts () {
return {
transform: (commit) => {
if (!commit.language) {
return
}
if (typeof commit.hash === `string`) {
commit.hash = commit.hash.substring(0, 7)
}
return commit
},
groupBy: `language`,
commitGroupsSort: `title`,
commitsSort: [`language`, `type`, `message`]
}
}