Added a frameset, for bypassing the SOP during local 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   grunt.loadNpmTasks('grunt-svgstore');
7
8   grunt.initConfig({
9
10     pkg: grunt.file.readJSON('package.json'),
11
12     copy: {
13       html: {
14         expand: true,
15         cwd: 'html',
16         src: '**/*.html',
17         dest: 'dist/thymeleaf/templates'
18       },
19       fonts: {
20         src: 'fonts/**/*',
21         dest: 'dist/'
22       }
23     },
24
25     less: {
26       compile: {
27         options: {
28           sourceMapURL: 'frontend.css.map',
29           sourceMapFilename: 'dist/css/frontend.css.map'
30         },
31         src: 'less/frontend.less',
32         dest: 'dist/css/frontend.css'
33       }
34     },
35
36     svgstore: {
37       options: {
38         cleanup: true
39       },
40       sprite: {
41         files: {
42           'dist/img/sprite.svg': [
43             'img/mo.svg'
44           ]
45         }
46       }
47     },
48
49     watch: {
50       copy: {
51         files: [ 'html/**/*.html' ],
52         tasks: [ 'copy' ]
53       },
54       less: {
55         files: [ 'less/**/*.less' ],
56         tasks: [ 'less' ]
57       },
58       svgstore: {
59         files: [ 'img/**/*.svg' ],
60         tasks: [ 'svgstore' ]
61       }
62     }
63
64   });
65
66   grunt.registerTask('default', [ 'copy', 'less', 'svgstore' ]);
67
68 };