-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.coffee
56 lines (47 loc) · 1.46 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
module.exports = (grunt) ->
# load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
concat:
min:
files:
'public/js/main.js': ['public/js/src/libs/*.js','public/js/src/*.js']
compass:
dist:
options:
config: 'public/style/config.rb'
sassDir: 'public/style/sass'
imagesDir: 'public/img'
cssDir: 'public/style'
environment: 'production'
outputStyle: 'compressed'
force: true
imagemin:
dynamic:
files: [
expand: true
cwd: 'public/img/src'
src: ['*.{png,jpg,gif}']
dest: 'public/img/'
]
browser_sync:
files:
src: 'public/style/screen.css'
options:
host: "localhost"
watchTask: true
watch:
options:
livereload: true
scripts:
files: ['public/js/src/*.js','public/js/src/libs/*.js']
tasks: ['concat']
styles:
files: ['public/style/**/*.{sass,scss}','public/img/ui/*.png']
tasks: ['compass']
images:
files: ['public/img/src/*.{png,jpg,gif}']
tasks: ['imagemin']
# Development task checks and concatenates JS, compiles SASS preserving comments and nesting, runs dev server, and starts watch
grunt.registerTask 'default', ['compass', 'concat', 'imagemin', 'browser_sync', 'watch']