-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
78 lines (74 loc) · 2.56 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/**
* Created by askmebefore on 30.11.14.
*/
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
node_modules_path: 'node_modules',
vendor_path: 'frontend/vendor',
custom_css_path: 'frontend/css',
app_path: 'frontend/app',
js_path: 'static/js',
css_path: 'static/css',
fonts_path: 'static/fonts',
copy: {
main: {
files:[
{
expand: true,
cwd: '<%= vendor_path %>/bootstrap/dist/fonts/',
src: ['**'],
dest: '<%= fonts_path %>/',
filter: 'isFile'
},
{
expand: true,
cwd: '<%= vendor_path %>/bootstrap/dist/css/',
src: ['**'],
dest: '<%= css_path %>/',
filter: 'isFile'
},
{
expand: true,
cwd: '<%= node_modules_path %>/highlight.js/styles/',
src: ['**'],
dest: '<%= css_path %>/code_highlight/',
filter: 'isFile'
},
{
expand: true,
cwd: '<%= custom_css_path %>/',
src: ['**'],
dest: '<%= css_path %>/',
filter: 'isFile'
}
]
}
},
concat: {
options: {
separator: '\n'
},
libs: {
src: [
'<%= vendor_path %>/jquery/dist/jquery.js',
'<%= vendor_path %>/bootstrap/dist/js/bootstrap.js',
'<%= vendor_path %>/bootstrap-file-input/bootstrap-file-input.js',
'<%= vendor_path %>/angular/angular.js',
'<%= vendor_path %>/underscore/underscore.js'
],
dest: '<%= js_path %>/libs.js'
},
app: {
src:[
'<%= app_path %>/app.js',
'<%= app_path %>/controllers/datasetController.js'
],
dest: '<%= js_path %>/app.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('compile', ['copy', 'concat']);
};