This repository has been archived by the owner on Jan 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathGruntfile.coffee
70 lines (58 loc) · 1.8 KB
/
Gruntfile.coffee
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
module.exports = ->
# Initialize the configuration
@initConfig
pkg: @file.readJSON "package.json"
banner: """
/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today('yyyy-mm-dd') %>
* <%= pkg.homepage %>
* Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>; Licensed <%= pkg.license %> */
"""
clean:
src: "dist/*"
coffee:
compileJoined:
options:
join: true
files:
"dist/videojs.chromecast.js": [
"lang/*"
"src/videojs.chromecast.coffee"
"src/videojs.chromecast-component.coffee"
"src/videojs.chromecast-tech.coffee"
]
uglify:
options:
compress:
drop_console: true
pure_funcs: ["vjs.log"]
dist:
src: "dist/videojs.chromecast.js"
dest: "dist/videojs.chromecast.min.js"
less:
development:
files:
"dist/videojs.chromecast.css": "src/videojs.chromecast.less"
cssmin:
dist:
src: "dist/videojs.chromecast.css"
dest: "dist/videojs.chromecast.min.css"
usebanner:
options:
position: "top"
banner: "<%= banner %>"
files:
src: [
"dist/videojs.chromecast.js"
"dist/videojs.chromecast.min.js"
"dist/videojs.chromecast.min.css"
"dist/videojs.chromecast.css"
]
# Load external Grunt task plugins
@loadNpmTasks "grunt-contrib-clean"
@loadNpmTasks "grunt-contrib-uglify"
@loadNpmTasks "grunt-contrib-cssmin"
@loadNpmTasks "grunt-contrib-coffee"
@loadNpmTasks "grunt-contrib-less"
@loadNpmTasks "grunt-banner"
# Default task
@registerTask "default", ["clean", "coffee", "uglify", "less", "cssmin", "usebanner"]