-
Notifications
You must be signed in to change notification settings - Fork 13
/
Gruntfile.js
121 lines (116 loc) · 3.97 KB
/
Gruntfile.js
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/**
* Created by alo on 7/8/14.
*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ["dist", "views/compiled"],
concat: {
js: {
src: [
'views/compiled/templates.js',
'js/conceptExpressions.js',
'js/conceptDetailsPlugin.js',
'js/countryIcons.js',
'js/drawConceptDiagram.js',
'js/popover.js',
'js/searchPlugin.js',
'js/svgdiagrammingv2.js',
'js/taxonomyPlugin.js',
'js/refsetPlugin.js',
'js/favoritesPlugin.js',
'js/queryPlugin.js',
'js/util.js'
],
dest: 'dist/js/<%= pkg.name %>-<%= pkg.version %>.js'
},
css: {
src: 'css/*.css',
dest: 'dist/css/<%= pkg.name %>-<%= pkg.version %>.css'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'dist/js/<%= pkg.name %>-<%= pkg.version %>.js',
dest: 'dist/js/<%= pkg.name %>-<%= pkg.version %>.min.js'
}
},
cssmin: {
css: {
src: 'dist/css/<%= pkg.name %>-<%= pkg.version %>.css',
dest: 'dist/css/<%= pkg.name %>-<%= pkg.version %>.min.css'
}
},
handlebars: {
compile: {
options: {
namespace: "JST"
},
files: {
"views/compiled/templates.js": "views/**/*.hbs"
}
}
},
bump: {
options: {
files: ['package.json'],
updateConfigs: [],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['-A'],
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'origin',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d'
}
},
release: {
options: {
bump: false, //default: true
npm: false, //default: true
npmtag: true, //default: no tag
github: {
repo: 'termmed/snomed-interaction-components', //put your user/repo here
usernameVar: 'GITHUB_USERNAME', //ENVIRONMENT VARIABLE that contains Github username
passwordVar: 'GITHUB_PASSWORD' //ENVIRONMENT VARIABLE that contains Github password
}
}
},
jshint: {
all: ['js/**/*.js'],
options: {
reporter: require('jshint-stylish'),
reporterOutput: 'dist/jshint-output.txt'
}
},
changelog: {
options: {
// Task-specific options go here.
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-handlebars');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-conventional-changelog');
grunt.loadNpmTasks('grunt-release');
// Default task(s).
grunt.registerTask('default', ['clean', 'handlebars', 'concat','uglify', 'cssmin']);
grunt.registerTask('releaseit', function(target) {
grunt.task.run([
'bump-only:' + target,
'default'
]);
});
};