-
Notifications
You must be signed in to change notification settings - Fork 1
/
gruntfile.coffee
36 lines (31 loc) · 1008 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
module.exports = (grunt) ->
sourceOrigin = 'src/**/*.coffee'
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
coffeelint:
source: ['src/**/*.coffee']
coffee:
compile:
files:
'dist/<%= pkg.name %>.js': ['udefine/*.coffee', 'src/*.coffee']
tests:
files: [{
expand: true
src: ['test/*.coffee']
ext: '.js'
}]
mochaTest:
options:
reporter: 'spec'
test:
src: ['test/**/*.js']
uglify:
options:
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("dd-mm-yyyy") %> */\n'
report: 'gzip'
dist:
files:
'dist/<%= pkg.name %>.min.js': 'dist/<%= pkg.name %>.js'
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
grunt.registerTask 'test', 'Lints and unit tests', ['coffeelint', 'mochaTest']
grunt.registerTask 'default', 'Default task', ['coffee', 'test', 'uglify']