-
Notifications
You must be signed in to change notification settings - Fork 1
/
GruntFile.coffee
54 lines (44 loc) · 1.82 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module.exports = (grunt) ->
'use strict'
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
file: 'marathon'
banner: '/* <%= pkg.name %> v<%= pkg.version %> - <%= grunt.template.today("yyyy/m/d") %>\n' +
' <%= pkg.homepage %>\n' +
' Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>' +
' - Licensed <%= _.pluck(pkg.license, "type").join(", ") %> */\n'
build: 'build'
specs: 'specs'
reports: 'reports'
source:
coffee: 'src/marathon.coffee'
specs: 'spec/marathon.coffee'
coffee:
source:
files:
'<%=meta.build%>/<%=meta.file%>-<%=pkg.version%>/<%=meta.file%>.debug.js': '<%= source.coffee %>'
'<%=meta.build%>/<%=meta.file%>-<%=pkg.version%>/<%=meta.specs%>/<%=meta.file%>.js': '<%= source.specs %>'
uglify:
options:
compress: true
banner: "<%= meta.banner %>"
engine:
files: '<%=meta.build%>/<%=meta.file%>-<%=pkg.version%>/<%=meta.file%>.js' : '<%=meta.build%>/<%=meta.file%>-<%=pkg.version%>/<%=meta.file%>.debug.js'
jasmine:
src: '<%=meta.build%>/<%=meta.file%>-<%=pkg.version%>/<%=meta.file%>.debug.js'
options:
specs: '<%=meta.build%>/<%=meta.file%>-<%=pkg.version%>/<%=meta.specs%>/*.js'
template : require('grunt-template-jasmine-istanbul')
templateOptions:
coverage: '<%=meta.build%>/<%=meta.file%>-<%=pkg.version%>/<%=meta.reports%>/coverage.json'
report: '<%=meta.build%>/<%=meta.file%>-<%=pkg.version%>/<%=meta.reports%>/coverage'
watch:
src:
files: ['<%= source.coffee %>','<%= source.specs %>']
tasks: ['default']
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-jasmine'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.registerTask 'default', ['coffee', 'uglify', 'jasmine']