forked from matthewhudson/current-device
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.coffee
39 lines (35 loc) · 1016 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
uglify:
options:
banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n'
build:
src: 'lib/device.js'
dest: 'lib/device.min.js'
coffee:
compile:
options:
banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n'
join: yes
files:
'lib/device.js': [
'src/device.coffee'
]
bumpup: 'package.json'
watch:
coffeescripts:
files: [
'src/device.coffee'
]
tasks: ['build']
options:
livereload: true
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-bumpup'
grunt.registerTask 'build', ['release', 'coffee', 'uglify']
grunt.registerTask 'release', (type) ->
type = if type then type else 'patch'
grunt.task.run "bumpup:#{type}"