forked from rotaready/moment-range
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
39 lines (33 loc) · 1005 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.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-mocha-test')
grunt.loadNpmTasks('grunt-umd')
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
compile:
options:
bare: true
files:
'lib/moment-range.bare.js': 'src/moment-range.coffee'
mochaTest:
test:
options:
reporter: 'spec'
require: 'coffee-script'
src: ['test/**/*.coffee']
uglify:
'moment-range':
files:
'lib/moment-range.min.js': ['lib/moment-range.js']
'lib/moment-range.bare.min.js': ['lib/moment-range.bare.js']
umd:
all:
src: 'lib/moment-range.bare.js'
dest: 'lib/moment-range.js'
globalAlias: 'moment'
objectToExport: 'moment'
deps:
default: ['moment']
grunt.registerTask('default', ['coffee', 'umd', 'uglify', 'mochaTest'])