Simple Example-Project for Template-Development
[examples/template-development] / Gruntfile.js
1 module.exports = function(grunt) {
2
3   grunt.loadNpmTasks('grunt-contrib-copy');
4   grunt.loadNpmTasks('grunt-contrib-less');
5   grunt.loadNpmTasks('grunt-contrib-watch');
6
7   grunt.initConfig({
8
9     pkg: grunt.file.readJSON('package.json'),
10
11     copy: {
12       html: {
13         expand: true,
14         cwd: 'html',
15         src: '**/*.html',
16         dest: 'dist/thymeleaf/templates',
17       }
18     },
19
20     less: {
21       compile: {
22         options: {
23           sourceMapURL: 'frontend.css.map',
24           sourceMapFilename: 'dist/css/frontend.css.map'
25         },
26         src: 'less/frontend.less',
27         dest: 'dist/css/frontend.css'
28       }
29     },
30
31     watch: {
32       copy: {
33         files: [ 'html/**/*.html' ],
34         tasks: [ 'copy' ]
35       },
36       less: {
37         files: [ 'less/**/*.less' ],
38         tasks: [ 'less' ]
39       }
40     }
41
42   });
43
44   grunt.registerTask('default', [ 'copy', 'less' ]);
45
46 };