forked from jplayer/jPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
86 lines (77 loc) · 2.54 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
76
77
78
79
80
81
82
83
84
85
86
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
// maxLineLen: 0 // Generates the output on a single line
},
jplayer: {
options: {
banner: '/*! jPlayer <%= pkg.version %> for jQuery ~ (c) 2009-<%= grunt.template.today("yyyy") %> <%= pkg.organization %> ~ <%= pkg.license %> License */\n'
},
files: {
'js/jplayer/jquery.jplayer.min.js': ['src/javascript/jplayer/jquery.jplayer.js']
}
},
playlist: {
options: {
banner: '/*! jPlayerPlaylist for jPlayer <%= pkg.version %> ~ (c) 2009-<%= grunt.template.today("yyyy") %> <%= pkg.organization %> ~ <%= pkg.license %> License */\n'
},
files: {
'js/add-on/jplayer.playlist.min.js': ['src/javascript/add-on/jplayer.playlist.js']
}
},
inspector: {
options: {
banner: '/*! jPlayerInspector for jPlayer <%= pkg.version %> ~ (c) 2009-<%= grunt.template.today("yyyy") %> <%= pkg.organization %> ~ <%= pkg.license %> License */\n'
},
files: {
'js/add-on/jquery.jplayer.inspector.min.js': ['src/javascript/add-on/jquery.jplayer.inspector.js']
}
},
popcorn: {
options: {
banner: '/*! Popcorn Player for jPlayer <%= pkg.version %> ~ (c) 2009-<%= grunt.template.today("yyyy") %> <%= pkg.organization %> ~ <%= pkg.license %> License */\n'
},
files: {
'js/popcorn/popcorn.jplayer.min.js': ['src/javascript/popcorn/popcorn.jplayer.js']
}
},
},
jshint: {
test: {
src: [
'Gruntfile.js',
'*.json',
'src/javascript/**/*.js',
'!**/jquery.jplayer.inspector.js' // The inspector does not pass jshint, and this will be addressed in due course.
]
},
// jQuery linting guide http://contribute.jquery.org/style-guide/js/#linting
// docs http://www/jshint.com/docs/
options: {
// Using .jshintrc files for the options.
jshintrc: true
}
},
mxmlc: {
options: {
rawConfig: '-static-link-runtime-shared-libraries=true'
},
jplayer: {
files: {
// Compile and give the SWF a filename like the JavaScript filenames. Important as it is the jPlayer code.
'js/jplayer/jquery.jplayer.swf': ['src/actionscript/Jplayer.as']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-mxmlc');
grunt.registerTask('default', ['test', 'build']);
grunt.registerTask('test', ['jshint']);
grunt.registerTask('build', ['js', 'swf']);
grunt.registerTask('js', ['uglify']);
grunt.registerTask('swf', ['mxmlc']);
};