forked from thewarpaint/thewarpaint.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.coffee
57 lines (50 loc) · 1.72 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
module.exports = (grunt) ->
# Load watch and less plugins
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-connect'
# Start configuration block
grunt.initConfig
# Files to watch, and tasks to run
watch:
gruntfile:
files: ['Gruntfile.js']
less:
files: ['less/**/*.less']
tasks: ['less:dev']
livereload:
options:
livereload: '<%= connect.options.livereload %>'
files: ['css/**/*.css',
'app/**/*.js',
'index.html']
# Connect/livereload settings
connect:
options:
port: 9000
# Change to '0.0.0.0' to access from outside
hostname: 'localhost'
livereload: 35729
livereload:
options:
open: true
# Less compiler settings
less:
dev:
options:
paths: ['less']
sourceMap: true
sourceMapFilename: 'css/app.css.map'
sourceMapURL: 'app.css.map'
src: ['less/app.less']
dest: 'css/app.css'
prod:
options:
paths: ['less']
compress: true
src: ['less/app.less']
dest: 'css/app.css'
# Default task is to watch and livereload for now
grunt.registerTask 'default', ['less:dev', 'connect:livereload', 'watch']
# For building for production
grunt.registerTask 'build', 'less:prod'