-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.coffee
43 lines (36 loc) · 958 Bytes
/
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
module.exports = (grunt) ->
log = grunt.log
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
# grunt coffee
coffee:
compile:
expand: true
cwd: 'src'
src: ["**/*.coffee"]
dest: 'dist/'
ext: '.js'
options:
bare: true
preserve_dirs: true
# uglify
uglify:
options:
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
build:
src: 'dist/bg_video.js'
dest: 'dist/bg_video.min.js'
# watching
watch:
scripts:
files: '<%= uglify.build.src %>'
tasks: ['uglify']
coffee:
files: '<%= coffee.compile.src %>'
tasks: ['coffee']
# Load plugins
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-uglify'
# Tasks
grunt.registerTask 'default', ['coffee', 'uglify', 'watch']