-
Notifications
You must be signed in to change notification settings - Fork 1
/
grunt.js
96 lines (86 loc) · 2.35 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
90
91
92
93
94
95
96
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta : {
banner : '/**\n' +
'* <%= pkg.title %> - v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n' +
'* <%= pkg.homepage %>\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.authors %>;\n' +
'* Dual Licensed: <%= _.pluck(pkg.licenses, "type").join(", ") %>\n' +
'* https://github.com/misoproject/events/blob/master/LICENSE-MIT \n' +
'*/',
lastbuild : '<%= grunt.template.today("yyyy/mm/dd hh:ss") %>'
},
node: {
wrapper: "src/node/compat.js",
content: 'dist/miso.events.<%= pkg.version %>.js'
},
lint: {
files: ['grunt.js', 'src/*.js', 'test/unit/**/*.js']
},
qunit : {
urls : [
"http://localhost:9292/test/index.html"
]
},
concat: {
dist: {
dest: 'dist/miso.events.<%= pkg.version %>.js',
src: [
'<banner:meta.banner>',
'src/events.js'
]
},
fulldeps: {
dest : "dist/miso.events.deps.<%= pkg.version %>.js",
src : [
"lib/lodash.js",
'dist/miso.events.<%= pkg.version %>.js'
]
}
},
min: {
dist: {
dest: 'dist/miso.events.min.<%= pkg.version %>.js',
src: [
'<banner:meta.banner>',
'dist/miso.events.<%= pkg.version %>.js'
]
},
fulldeps: {
dest : "dist/miso.events.deps.min.<%= pkg.version %>.js",
src : [
"<banner>",
"dist/miso.events.deps.<%= pkg.version %>.js"
]
}
},
watch: {
files: '<config:lint.files>',
tasks: 'lint test'
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
predef : [ "_", "Miso", "require", "exports", "define", "module", "test", "ok", "equals" ]
},
globals: {}
},
uglify: {}
});
// load available tasks.
grunt.loadTasks("tasks");
// Default task.
grunt.registerTask('default', 'lint testserver qunit concat min node');
};