1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | module.exports = function (grunt) {
|
7 | window = {};
|
8 |
|
9 | var json = {
|
10 | pkg: grunt.file.readJSON('package.json'),
|
11 |
|
12 | |
13 |
|
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);
|
39 |
|
40 | grunt.initConfig();
|
41 | grunt.config.merge(json);
|
42 |
|
43 | |
44 |
|
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 |
|
54 |
|
55 | grunt.registerTask('build', ['clean:fonts', 'copy:public']);
|
56 |
|
57 | grunt.registerTask('default', ['build']);
|
58 |
|
59 | };
|