forked from MaxLaumeister/bitlisten
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.js
55 lines (49 loc) · 1.22 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
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'])
}
},
watch: {
all: {
files: srcFiles.concat(['Gruntfile.js']),
tasks: ['uglify', 'connect'],
options: {
interrupt: true,
atBegin: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-uglify-es');
grunt.loadNpmTasks('grunt-newer');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['uglify']);
};