forked from adobe-business-catalyst/web-app-export
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
82 lines (76 loc) · 2.03 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
79
80
81
82
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
concat:{
popup:{
src:[
'src/scripts/popup/app.js',
'src/scripts/popup/controllers/**/*.js',
'src/scripts/popup/directives/**/*.js',
'src/scripts/popup/services/**/*.js',
],
dest:'build/scripts/popup.js'
},
popup_libs:{
src:[
'src/scripts/popup/lib/jquery.min.js',
'src/scripts/popup/lib/bootstrap.min.js',
'src/scripts/popup/lib/angular.min.js',
],
dest:'build/scripts/popup-libs.js'
},
content:{
src:[
'src/scripts/content/classes/*.js',
'src/scripts/content/contentscript.js',
],
dest:'build/scripts/contentscript.js'
},
content_libs:{
src:[
'src/scripts/content/libs/jquery.min.js',
'src/scripts/content/libs/jquery.cookie.js',
'src/scripts/content/libs/klass.min.js'
],
dest:'build/scripts/contentscript-libs.js'
}
},
uglify: {
options: {
mangle: false
},
popup: {
files:{
'build/scripts/popup.min.js':['build/scripts/popup.js'],
'build/scripts/contentscript.min.js':['build/scripts/contentscript.js'],
'build/scripts/background.min.js':['src/scripts/content/background.js']
}
}
},
copy:{
main:{
files:[
{
src:['assets/**', 'tpl/**', 'manifest.json', 'index.html'],
dest:'build/',
cwd:'src/',
expand:true
}
]
}
},
watch:{
scripts:{
files:['src/**/*'],
tasks:['default']
}
}
});
// Load Grunt contrib plugins
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['concat','uglify','copy']);
};