Add capacitorjs runtime
This commit is contained in:
parent
d0ece489ee
commit
f90c0e6c40
8362 changed files with 1502407 additions and 1 deletions
56
node_modules/conventional-changelog-jshint/writer-opts.js
generated
vendored
Normal file
56
node_modules/conventional-changelog-jshint/writer-opts.js
generated
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
'use strict'
|
||||
|
||||
const compareFunc = require('compare-func')
|
||||
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'),
|
||||
readFile(resolve(__dirname, './templates/footer.hbs'), 'utf-8')
|
||||
])
|
||||
.spread((template, header, commit, footer) => {
|
||||
const writerOpts = getWriterOpts()
|
||||
|
||||
writerOpts.mainTemplate = template
|
||||
writerOpts.headerPartial = header
|
||||
writerOpts.commitPartial = commit
|
||||
writerOpts.footerPartial = footer
|
||||
|
||||
return writerOpts
|
||||
})
|
||||
|
||||
function getWriterOpts () {
|
||||
return {
|
||||
transform: (commit) => {
|
||||
const type = commit.type ? commit.type.toUpperCase() : ''
|
||||
|
||||
if (type === 'FEAT') {
|
||||
commit.type = 'Features'
|
||||
} else if (type === 'FIX') {
|
||||
commit.type = 'Bug Fixes'
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
||||
if (typeof commit.hash === 'string') {
|
||||
commit.hash = commit.hash.substring(0, 7)
|
||||
}
|
||||
|
||||
commit.notes.forEach(note => {
|
||||
if (note.title === 'BREAKING CHANGE') {
|
||||
note.title = 'BREAKING CHANGES'
|
||||
}
|
||||
})
|
||||
|
||||
return commit
|
||||
},
|
||||
groupBy: 'type',
|
||||
commitGroupsSort: 'title',
|
||||
commitsSort: ['type', 'shortDesc'],
|
||||
noteGroupsSort: 'title',
|
||||
notesSort: compareFunc
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue