-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
89 lines (87 loc) · 2.7 KB
/
grunt.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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner:
'/*!--------------------- FLYPAPER -------------------------//\n' +
' * <%= pkg.name %> - v<%= pkg.version %>\n' +
' * Author: <%= pkg.author.name %>\n' +
' * Email: <%= pkg.author.email %>\n' +
' * URL: <%= pkg.author.url %>\n' +
' * Date: <%= grunt.template.today("yyyy-mm-dd HH:MM:ss") %>\n' +
'<%= pkg.homepage ? " * " + pkg.homepage + "\n" : "" %>' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;\n' +
' * Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> \n */\n' +
' //--------------------------------------------------------//\n'
},
concat: {
dist: {
src: [ '<banner:meta.banner>',
'<file_strip_banner:src/head.js>',
'<file_strip_banner:src/layers.js>',
'<file_strip_banner:src/color.js>',
'<file_strip_banner:src/colorPalette.js>',
'<file_strip_banner:src/eventCtrlr.js>',
'<file_strip_banner:src/infoCtrlr.js>',
'<file_strip_banner:src/eventHandlers.js>',
'<file_strip_banner:src/init.js>',
'<file_strip_banner:src/math.js>',
'<file_strip_banner:src/motions/motion.js>',
'<file_strip_banner:src/motions/scroll.js>',
'<file_strip_banner:src/motions/bob.js>',
'<file_strip_banner:src/motions/swing.js>',
'<file_strip_banner:src/objects/Ananda.js>',
'<file_strip_banner:src/objects/Pullbar.js>'
],
dest: 'dist/<%= pkg.libname %>.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: 'dist/<%= pkg.libname %>.min.js'
}
},
qunit: {
files: ['test/test-build.html','test/test-init.html'],
scratch: ['test/test-scratch.html']
},
lint: {
files: ['grunt.js', 'src/**/*.js', 'test/**/!(scratch).js', 'examples/**/*.js'],
scratch: ['grunt.js','scratchpad/**/*.js','test/tests/scratch.js']
},
watch: {
files: '<config:lint.files>',
tasks: 'lint qunit'
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true
},
globals: {
exports: true,
paper: true,
fly: true,
module: false,
navigator: true,
window: true,
document: true
}
},
uglify: {}
});
// Default task.
grunt.registerTask('default', 'lint:files qunit:files concat min');
grunt.registerTask('dirty', 'lint:files concat');
grunt.registerTask('scratch', 'lint:files lint:scratch qunit:scratch');
};