@@ -23,19 +23,37 @@ module.exports = (grunt) ->
2323coffee :
2424withMaps :
2525options :
26+ bare : true
2627sourceMap : true
2728files :
2829' src/<%= pkg.name %>.js' : ' src/<%= pkg.name %>.coffee'
2930withoutMaps :
3031options :
32+ bare : true
3133sourceMap : false
3234files :
3335' dist/<%= pkg.name %>.js' : ' src/<%= pkg.name %>.coffee'
3436
3537watch :
3638scripts :
3739files : [' src/*.coffee' ]
38- tasks : [' coffee' ]
40+ tasks : [' coffee' ,' umd' ]
41+
42+ umd :
43+ options :
44+ template : ' umd'
45+ deps :
46+ ' default' : [' $' ]
47+ amd : [' jquery' ]
48+ cjs : [' jquery' ]
49+ global :
50+ items : [' jQuery' ]
51+ prefix : ' '
52+ src :
53+ src : ' src/<%= pkg.name %>.js'
54+ dist :
55+ src : ' dist/<%= pkg.name %>.js'
56+
3957
4058' json-replace' :
4159options :
@@ -53,8 +71,9 @@ module.exports = (grunt) ->
5371grunt .loadNpmTasks ' grunt-contrib-jasmine'
5472grunt .loadNpmTasks ' grunt-json-replace'
5573grunt .loadNpmTasks ' grunt-contrib-watch'
74+ grunt .loadNpmTasks ' grunt-umd'
5675
5776grunt .registerTask ' update-version' ,' json-replace'
5877
59- grunt .registerTask ' default' , [' coffee' ,' jasmine' ,' update-version' ,' uglify' ,' watch' ]
60- grunt .registerTask ' test' , [' coffee' ,' jasmine' ]
78+ grunt .registerTask ' default' , [' coffee' ,' umd ' , ' jasmine' ,' update-version' ,' uglify' ,' watch' ]
79+ grunt .registerTask ' test' , [' coffee' ,' umd ' , ' jasmine' ]