Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
25
my-app/node_modules/karma-chrome-launcher/tools/update-contributors.js
generated
vendored
Executable file
25
my-app/node_modules/karma-chrome-launcher/tools/update-contributors.js
generated
vendored
Executable file
|
@ -0,0 +1,25 @@
|
|||
// From https://github.com/karma-runner/karma/blob/master/tools/update-contributors.js
|
||||
// When modifying this file also modify upstream.
|
||||
const { execSync } = require('child_process')
|
||||
const { readFileSync, writeFileSync } = require('fs')
|
||||
const { resolve } = require('path')
|
||||
|
||||
const prepare = async (pluginConfig, { logger }) => {
|
||||
// Example output:
|
||||
// 1042 Vojta Jina <vojta.jina@gmail.com>
|
||||
// 412 Friedel Ziegelmayer <friedel.ziegelmayer@gmail.com>
|
||||
// 206 dignifiedquire <friedel.ziegelmayer@gmail.com>
|
||||
// 139 johnjbarton <johnjbarton@johnjbarton.com>
|
||||
const stdout = execSync('git log --pretty=short | git shortlog -nse', { encoding: 'utf8' })
|
||||
|
||||
const pkgPath = resolve(__dirname, '..', 'package.json')
|
||||
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'))
|
||||
|
||||
// First line is already included as author field. Last line is dropped as it is an empty line.
|
||||
pkg.contributors = stdout.split('\n').slice(1, -1).map((line) => line.replace(/^[\W\d]+/, ''))
|
||||
writeFileSync(pkgPath, JSON.stringify(pkg, undefined, ' ') + '\n', 'utf8')
|
||||
|
||||
logger.info('Updated contributors list.')
|
||||
}
|
||||
|
||||
module.exports = { prepare }
|
Loading…
Add table
Add a link
Reference in a new issue