forked from dominicrico/bulmajs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
62 lines (52 loc) · 1.33 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
59
60
61
62
module.exports = (grunt) ->
# Constants
BUILD_PATH = 'build'
# Project configuration
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
clean:
build: [BUILD_PATH]
coffee:
build:
options:
bare: true
files: [
expand: true
cwd: 'src'
src: ['**/*.coffee']
dest: 'build/components'
ext: '.js'
]
concat:
options:
separator: ';'
stripBanners: true,
banner: '/**\n* <%= pkg.name %> - version <%= pkg.version %> - ' +
'<%= grunt.template.today("dd-mm-yyyy") %>\n' +
'* <%= pkg.description %>\n' +
'* © <%= grunt.template.today("yyyy") %> <%= pkg.author %> \n' +
'*/\n\n',
build:
src: ['build/components/**/*.js']
dest: 'build/bulma.js'
uglify:
build:
files:
'build/min/bulma.min.js': ['build/bulma.js']
# Dependencies
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-uglify'
# Aliases
grunt.registerTask 'build', [
'clean:build'
'coffee:build'
'concat:build'
'uglify:build'
]
grunt.registerTask 'default', [
'clean:build'
'coffee:build'
'concat:build'
]