-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
49 lines (43 loc) · 1.4 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON "tutor.jquery.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 <%= _.pluck(pkg.licenses, "type").join(", ") %> */
"""
less:
production:
options:
paths: ["src"]
yuicompress: true
files:
"dist/jquery.tutor.min.css": "src/jquery.tutor.less"
clean:
files: ["dist"]
uglify:
options:
banner: "<%= banner %>"
dist:
src: "src/jquery.tutor.js"
dest: "dist/jquery.tutor.min.js"
qunit:
files: ["test/*.html"]
# Run predefined tasks whenever watched file patterns are added, changed or deleted.
watch:
scripts:
files: "src/**/*.js"
tasks: ["uglify"]
options:
interrupt: true
styles:
files: "src/**/*.less"
tasks: ["less"]
options:
interrupt: true
grunt.loadNpmTasks "grunt-contrib-qunit"
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-contrib-less"
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.registerTask "default", ["qunit", "clean", "less", "uglify"]