-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
33 lines (27 loc) · 1019 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON "petitchart.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(", ") %> */
"""
clean:
files: ["dist"]
uglify:
options:
banner: "<%= banner %>"
dist:
src: "src/jquery.petitchart.js"
dest: "dist/jquery.petitchart.min.js"
# Run predefined tasks whenever watched file patterns are added, changed or deleted.
watch:
scripts:
files: "src/**/*.js"
tasks: ["uglify"]
options:
interrupt: true
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.registerTask "default", ["clean", "uglify"]