forked from jazz-soft/JZZ-input-Kbd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
32 lines (32 loc) · 864 Bytes
/
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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: ['javascript/*.js']
},
uglify: {
javascript: {
expand: true,
cwd: 'javascript',
src: '*.js',
dest: 'minified'
}
}
});
grunt.task.registerTask('version', 'Check version consistency', function() {
var pkg = grunt.file.readJSON('package.json');
var JZZ = require('jzz');
require('.')(JZZ);
var ver = JZZ.input.Kbd.version();
if (ver == pkg.version) {
grunt.log.ok('Version:', ver);
}
else {
grunt.log.error('Version:', ver, '!=', pkg.version);
return false;
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('default', ['jshint', 'uglify', 'version']);
};