-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.coffee
40 lines (36 loc) · 1.07 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'
coffee:
compile:
options:
banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n'
join: yes
files:
'lib/<%= pkg.name %>.js': [
'src/<%= pkg.name %>.coffee'
]
bumpup: 'package.json'
uglify:
options:
banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n'
dist:
src: ['lib/mercado-bitcoin.js']
dest: 'lib/mercado-bitcoin.min.js'
watch:
coffeescripts:
files: [
'src/<%= pkg.name %>.coffee'
]
tasks: ['coffee']
options:
livereload: true
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-bumpup'
grunt.loadNpmTasks 'grunt-contrib-uglify'
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}"