-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathGruntfile.js
More file actions
32 lines (28 loc) · 1.04 KB
/
Gruntfile.js
File metadata and controls
32 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Task configuration.
pkg: grunt.file.readJSON('package.json'),
changelog: {
alf: {
options: {
featureRegex: /^(.*)(closes|updates|adds|adding)(.*)$/gim,
fixRegex: /^(.*)(fixes|removes)(.*)$/gim,
dest: 'release-notes/<%= pkg.version %>.md',
template: '## <%= pkg.version %> (<%= grunt.template.today("mmmm dS, yyyy") %>)\n\n{{> features}}{{> fixes}}',
partials: {
features: '{{#if features}}#### New Features\n{{#each features}}{{> feature}}{{/each}}\n{{else}}{{> empty}}{{/if}}',
feature: ' * {{this}}\n',
fixes: '{{#if fixes}}#### Bug Fixes\n{{#each fixes}}{{> fix}}{{/each}}\n{{else}}{{> empty}}{{/if}}',
fix: ' * {{this}}\n'
}
}
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-changelog');
// Default task.
grunt.registerTask('default', ['changelog:alf']);
};