-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathGruntfile.coffee
58 lines (47 loc) · 1.59 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
55
56
57
58
# global module:false
pkg = require './package.json'
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
banner: """
/* #{pkg.name} - v#{pkg.version} - #{@template.today('yyyy-mm-dd')}
* #{pkg.homepage}
* Copyright (c) #{@template.today('yyyy')} #{pkg.author}
*/\n\n
"""
coffeelint:
all: ['Gruntfile.coffee', 'src/**/*.coffee']
options:
indentation:
value: 4
level: 'error'
max_line_length:
value: 80
level: 'warn'
no_backticks:
level: 'warn'
coffee:
all:
files: 'moment-twitter.js': 'src/**/*.coffee'
bump:
options:
files: ['package.json', 'bower.json', 'component.json']
commitFiles: ['-a']
_release:
options:
bump: false
add: true
commit: true
tag: true
push: true
pushTags: true
npm: true
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-bump'
grunt.loadNpmTasks 'grunt-release'
grunt.registerTask 'build', ['coffeelint', 'coffee']
grunt.registerTask 'default', ['build']
grunt.renameTask 'release', '_release'
grunt.registerTask 'release', (target='') ->
grunt.task.run ["bump-only:#{target}", 'build', "_release:#{target}"]