-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
84 lines (71 loc) · 1.76 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
"use strict"
module.exports = (grunt) ->
targetCoffee = 'coffee/_fotoline_compile.coffee'
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
concat:
options:
separator: '\n\n'
fotoline:
src: [
'coffee/0_before.coffee'
'coffee/Item.coffee'
'coffee/Collection.coffee'
'coffee/Row.coffee'
'coffee/Fotoline.coffee'
'coffee/Arrows.coffee'
'coffee/Thumbs.coffee'
'coffee/zy_init.coffee'
'coffee/zz_after.coffee'
]
dest: targetCoffee
coffee:
fotoline:
files:
'fotoline.js': targetCoffee
clean: [ targetCoffee ]
less:
fotoline:
files:
"fotoline.css": "less/fotoline.less"
mkdir:
dist:
options: [
create: ['dist']
]
autoprefixer:
dist:
options:
browsers: ['last 2 versions', 'ie > 8', '> 1%']
files:
'fotoline.css': 'fotoline.css'
cssmin:
dist:
options:
keepSpecialComments: 0
files:
'dist/fotoline.css': 'fotoline.css'
uglify:
dist:
files:
'dist/fotoline.min.js': 'fotoline.js'
grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-mkdir')
grunt.loadNpmTasks('grunt-contrib-cssmin')
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.registerTask "default", [
"concat:fotoline"
"coffee:fotoline"
"clean"
"less:fotoline"
"autoprefixer"
]
grunt.registerTask "dist", [
"default"
"uglify"
"cssmin"
]