-
Notifications
You must be signed in to change notification settings - Fork 288
/
Gruntfile.coffee
executable file
·56 lines (48 loc) · 1.22 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
module.exports = (grunt) ->
banner = [
'/**!'
' * <%= pkg.description %>'
' * @project <%= pkg.name %>'
' * @author <%= pkg.author.name %> <<%= pkg.author.email %>>'
' * @link <%= pkg.homepage %>'
' * @link <%= pkg.repository.url %>'
' * @copyright <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>'
' * @license <%= pkg.license %>'
' * @version <%= pkg.version %>'
' */\n'
]
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
jshint:
options:
jshintrc: '.jshintrc'
files: [
'jquery.signaturepad.js'
]
uglify:
minifiy:
options:
banner: banner.join('\n')
mangle: false
compress: true
preserveComments: 'some'
files:
'jquery.signaturepad.min.js': [
'jquery.signaturepad.js'
]
replace:
version:
src: [
'jquery.signaturepad.min.js'
]
overwrite: true
replacements: [{
from: /\{\{version\}\}/
to: '<%= pkg.version %>'
}]
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
grunt.registerTask 'default', [
'jshint'
'uglify'
'replace'
]