forked from matthewhudson/current-device
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.coffee
40 lines (36 loc) · 1.03 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
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: ['coffee']
options:
livereload: true
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-bumpup'
grunt.registerTask 'default', ['watch']
grunt.registerTask 'release', ['bump', 'coffee', 'uglify']
grunt.registerTask 'bump', (type) ->
type = if type then type else 'patch'
grunt.task.run "bumpup:#{type}"