-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
31 lines (21 loc) · 978 Bytes
/
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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
config: grunt.file.readJSON('grunt/config.json')
});
//load tasks when they are needed
require('jit-grunt')(grunt, {
validation: 'grunt-w3c-html-validation',
sftp: 'grunt-ssh'
});
//load tasks configurations from external files
grunt.loadTasks('grunt');
//custom tasks
grunt.registerTask('buildimages', ['newer:imagemin:main', 'svg_sprite:main']);
grunt.registerTask('buildcss', ['sass:dist', 'postcss', 'cssmin', 'csslint']);
grunt.registerTask('buildjs', ['newer:jshint:target', 'concat:expanded', 'uglify']);
grunt.registerTask('buildhtml', ['twigRender:dest', 'newer:validation:files']);
grunt.registerTask('build', ['buildimages', 'buildcss', 'buildjs', 'buildhtml']);
grunt.registerTask('deploytpl', ['sftp:deployhtml']);
grunt.registerTask('default', ['build','watch']);
};