Files
react-native-devtools-frontend/node_modules/karma/gruntfile.js
T
Tim van der Lippe 5226a88fe0 Update karma-related packages
This updates karma to 5.2.3, karma-coverage to the officially
published version 2.0.3 (we were previously relying on a git
commit) and karma-sourcemap-loader to 0.3.8.

DISABLE_THIRD_PARTY_CHECK=Update Karma

R=aerotwist@chromium.org

Change-Id: Iaa365379d7c2c6eb9145b1507be1a0a3ae812359
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2527043
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-09 17:42:16 +00:00

113 lines
2.5 KiB
JavaScript

module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
pkgFile: 'package.json',
files: {
server: ['lib/**/*.js'],
client: ['client/**/*.js'],
common: ['common/**/*.js'],
context: ['context/**/*.js'],
grunt: ['grunt.js', 'tasks/*.js']
},
browserify: {
client: {
files: {
'static/karma.js': ['client/main.js'],
'static/context.js': ['context/main.js']
}
}
},
test: {
unit: 'mochaTest:unit',
client: 'test/client/karma.conf.js'
},
watch: {
client: {
files: '<%= files.client %>',
tasks: 'browserify:client'
}
},
mochaTest: {
options: {
reporter: 'dot',
ui: 'bdd',
quiet: false,
colors: true
},
unit: {
src: [
'test/unit/mocha-globals.js',
'test/unit/**/*.spec.js'
]
}
},
'npm-publish': {
options: {
requires: ['build'],
abortIfDirty: true,
tag: 'latest'
}
},
'npm-contributors': {
options: {
commitMessage: 'chore: update contributors'
}
},
conventionalChangelog: {
release: {
options: {
changelogOpts: {
preset: 'angular'
}
},
src: 'CHANGELOG.md'
}
},
conventionalGithubReleaser: {
release: {
options: {
auth: {
type: 'oauth',
token: process.env.GH_TOKEN
},
changelogOpts: {
preset: 'angular'
}
}
}
},
bump: {
options: {
updateConfigs: ['pkg'],
commitFiles: [
'package.json',
'CHANGELOG.md'
],
commitMessage: 'chore: release v%VERSION%',
prereleaseName: 'rc'
}
}
})
grunt.loadNpmTasks('grunt-check-clean')
grunt.loadTasks('tasks')
require('load-grunt-tasks')(grunt)
grunt.registerTask('build', ['browserify:client'])
grunt.registerTask('default', ['build', 'test'])
grunt.registerTask('test-appveyor', ['test:unit', 'test:client'])
grunt.registerTask('release', 'Build, bump and publish to NPM.', function (type) {
grunt.task.run([
'check_clean',
'npm-contributors',
'bump:' + (type || 'patch') + ':bump-only',
'build',
'conventionalChangelog',
'bump-commit',
'conventionalGithubReleaser',
'npm-publish'
])
})
}