-
Notifications
You must be signed in to change notification settings - Fork 8
/
Gruntfile.js
75 lines (72 loc) · 2.47 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner:
'/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
' * <%= pkg.homepage %>\n' +
' *\n' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> <<%= pkg.author.email %>>;\n' +
' * Licensed under the <%= _.pluck(pkg.licenses, "type").join(", ") %> license */\n\n'
},
concat: {
options: {
separator: '\n\n'
},
build: {
options: {
banner: '<%= meta.banner %>'
},
src: [
'src/fingers.prefix',
'src/module.js',
'src/Utils.js',
'src/CacheArray.js',
'src/Instance.js',
'src/Finger.js',
'src/FingerUtils.js',
'src/Gesture.js',
'src/gestures/module.js',
'src/gestures/Drag.js',
'src/gestures/Hold.js',
'src/gestures/Pinch.js',
'src/gestures/Raw.js',
'src/gestures/Swipe.js',
'src/gestures/Tap.js',
'src/gestures/Transform.js',
'src/gestures/ZoneHover.js',
'src/export.js',
'src/fingers.suffix'],
dest: 'fingers.js'
}
},
uglify: {
options: {
report: 'gzip',
sourceMap: 'fingers.min.map',
banner: '<%= meta.banner %>'
},
build: {
files: {
'fingers.min.js': ['fingers.js']
}
}
},
jshint: {
options: {
jshintrc: true
},
build: {
src: ['fingers.js']
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Default task(s).
grunt.registerTask('default', ['concat', 'uglify', 'test']);
grunt.registerTask('test', ['jshint']);
};