UNPKG

1.23 kBJavaScriptView Raw
1/*
2 * This code was created for Printr B.V. It is open source under the formideos-interface package.
3 * Copyright (c) 2015, All rights reserved, http://printr.nl
4 */
5
6module.exports = function (grunt) {
7 window = {};
8
9 var json = {
10 pkg: grunt.file.readJSON('package.json'),
11
12 /*
13 * Clean folders before copying.
14 */
15 clean: {
16 fonts: ['./public/assets/fonts/*'],
17 tmp: ['<%= pkg.paths.tmp %>']
18 },
19
20 copy: {
21 options: {
22 noProcess: ['**/*.{eot,woff2,woff,ttf,svg,dae,tga}']
23 },
24 public: {
25 files: [
26 {
27 expand: true,
28 cwd: './bower_components/formide-platform/public',
29 src: '**/*',
30 dest: 'public/',
31 filter: 'isFile'
32 },
33 ]
34 }
35 },
36 }
37
38 require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks
39
40 grunt.initConfig();
41 grunt.config.merge(json);
42
43 /*
44 * Load NPM Plugins
45 */
46 grunt.loadNpmTasks('grunt-contrib-concat');
47 grunt.loadNpmTasks('grunt-contrib-uglify');
48 grunt.loadNpmTasks('grunt-contrib-clean');
49 grunt.loadNpmTasks('grunt-contrib-watch');
50 grunt.loadNpmTasks('grunt-contrib-copy');
51
52 /*
53 * Register Tasks
54 */
55 grunt.registerTask('build', ['clean:fonts', 'copy:public']);
56
57 grunt.registerTask('default', ['build']);
58
59};