-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.coffee
53 lines (48 loc) · 1.49 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
amd_tamer:
options:
base: 'src/'
namespace: 'milksugar'
all:
files:
'dist/<%= pkg.name %>.coffee': ['src/**/*.coffee']
coffee:
compile:
options:
sourceMap: true
files:
'dist/<%= pkg.name %>.js': 'dist/<%= pkg.name %>.coffee'
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/milksugar.js']
dependo:
targetPath: 'src'
outputPath: './doc/dependencies'
format: 'amd'
coffeelint:
all: ['src/**/*.coffee']
codo:
src: ['src']
options:
output: 'doc/api'
title: 'MilkSugar API Documentation'
grunt.loadNpmTasks 'grunt-amd-tamer'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-stylus'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-dependo'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.registerTask 'doc', 'Generated documentation', []
grunt.registerTask 'lint', ['coffeelint']
grunt.registerTask 'codo', ->
done = @async()
codo = require 'codo'
codo.run -> done()
grunt.registerTask 'default', 'Default task', ['amd_tamer', 'coffee', 'uglify', 'doc']