forked from jwagner/Neonflames
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
86 lines (83 loc) · 2.06 KB
/
Gruntfile.js
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
85
86
module.exports = function(grunt) {
grunt.initConfig({
watch: {
options: {
},
grunt: {
files: ['Gruntfile.js']
},
reload: {
options: {
livereload: true
},
files: ['*.css', '*.js', '*.html'],
tasks: []
},
css: {
files: ['*.scss'],
tasks: ['sass']
}
},
cssmin: {
release: {
files: {'dist/style.css':'dist/style.css'}
}
},
compress: {
release: {
expand: true,
cwd: 'public/',
src: ['css/*.css', 'js/*.js', '**/*.html', 'feed.atom', 'sitemap.atom'],
dest: 'public'
}
},
sass: {
style: {
options: {
sourceComments: 'map',
},
files: {'style.css': 'style.scss'}
}
},
connect: {
server: {
options: {
hostname: '*',
base: '.',
//keepalive: true,
livereload: true,
//debug: true,
open: true
}
}
},
rsync: {
options: {
recursive: true
},
release: {
options: {
src: './dist/',
dest: '/var/www/static/sandbox/2011/neonflames',
host: '29a.ch',
port: '22',
dryRun: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-rsync');
grunt.loadNpmTasks('grunt-sass');
//grunt.loadTasks('tasks');
grunt.registerTask('env', function(name) {
grunt.config('environment', grunt.config('environments')[name]);
});
grunt.registerTask('default', ['build', 'connect:server', 'watch']);
grunt.registerTask('build', ['sass']);
};