-
-
Notifications
You must be signed in to change notification settings - Fork 113
/
Gruntfile.js
59 lines (53 loc) · 1.34 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
module.exports = function(grunt) {
"use strict";
var srcFiles = ['src/*.js'];
var libFiles = ['lib/*.js'];
var destFile = 'bitlisten.min.js';
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
all: {
options: {
port: 8000,
keepalive: true
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> Copyright (c) <%= grunt.template.today("yyyy") %> Maximillian Laumeister, see README.md for license info. */\n',
sourceMap: true,
sourceMapIncludeSources: true
},
build: {
src: libFiles.concat(srcFiles),
dest: destFile
}
},
jshint: {
all: {
src: srcFiles.concat(['Gruntfile.js'])
},
options: {
'esversion': 6,
}
},
watch: {
all: {
files: srcFiles.concat(['Gruntfile.js']),
tasks: ['newer:jshint:all', 'uglify', 'connect'],
options: {
interrupt: true,
atBegin: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-newer');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['jshint', 'uglify']);
};