Last change
on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.6 KB
|
Line | |
---|
1 | module.exports = function (grunt) {
|
---|
2 | grunt.initConfig({
|
---|
3 | pkgFile: 'package.json',
|
---|
4 | simplemocha: {
|
---|
5 | options: {
|
---|
6 | ui: 'bdd',
|
---|
7 | reporter: 'dot'
|
---|
8 | },
|
---|
9 | unit: {
|
---|
10 | src: [
|
---|
11 | 'test/mocha-globals.js',
|
---|
12 | 'test/*.spec.js'
|
---|
13 | ]
|
---|
14 | }
|
---|
15 | },
|
---|
16 | 'npm-contributors': {
|
---|
17 | options: {
|
---|
18 | commitMessage: 'chore: update contributors'
|
---|
19 | }
|
---|
20 | },
|
---|
21 | conventionalChangelog: {
|
---|
22 | release: {
|
---|
23 | options: {
|
---|
24 | changelogOpts: {
|
---|
25 | preset: 'angular'
|
---|
26 | }
|
---|
27 | },
|
---|
28 | src: 'CHANGELOG.md'
|
---|
29 | }
|
---|
30 | },
|
---|
31 | conventionalGithubReleaser: {
|
---|
32 | release: {
|
---|
33 | options: {
|
---|
34 | auth: {
|
---|
35 | type: 'oauth',
|
---|
36 | token: process.env.GH_TOKEN
|
---|
37 | },
|
---|
38 | changelogOpts: {
|
---|
39 | preset: 'angular',
|
---|
40 | releaseCount: 0
|
---|
41 | }
|
---|
42 | }
|
---|
43 | }
|
---|
44 | },
|
---|
45 | bump: {
|
---|
46 | options: {
|
---|
47 | commitMessage: 'chore: release v%VERSION%',
|
---|
48 | pushTo: 'upstream',
|
---|
49 | commitFiles: [
|
---|
50 | 'package.json',
|
---|
51 | 'CHANGELOG.md'
|
---|
52 | ]
|
---|
53 | }
|
---|
54 | },
|
---|
55 | karma: {
|
---|
56 | options: {
|
---|
57 | singleRun: true
|
---|
58 | },
|
---|
59 | simple: {
|
---|
60 | configFile: 'examples/simple/karma.conf.js'
|
---|
61 | }
|
---|
62 | }
|
---|
63 | })
|
---|
64 |
|
---|
65 | require('load-grunt-tasks')(grunt)
|
---|
66 |
|
---|
67 | grunt.registerTask('test', ['simplemocha'])
|
---|
68 | grunt.registerTask('default', ['test'])
|
---|
69 |
|
---|
70 | grunt.registerTask('release', 'Bump the version and publish to NPM.', function (type) {
|
---|
71 | grunt.task.run([
|
---|
72 | 'npm-contributors',
|
---|
73 | 'bump:' + (type || 'patch') + ':bump-only',
|
---|
74 | 'conventionalChangelog',
|
---|
75 | 'bump-commit',
|
---|
76 | 'conventionalGithubReleaser',
|
---|
77 | 'npm-publish'
|
---|
78 | ])
|
---|
79 | })
|
---|
80 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.