-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
49 lines (46 loc) · 1.13 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
module.exports = function(grunt){
grunt.initConfig({
less: {
flag: {
src: 'node_modules/flag-icon-css/less/flag-icon.less',
dest: 'dist/css/flag-icon.css'
}
},
cssmin: {
flag: {
src: 'node_modules/flag-icon-css/css/flag-icon.css',
dest: 'dist/css/flag-icon.min.css'
}
},
concat: {
js: {
src: ['src/countryflags.module.js', 'src/countryflags.directive.js'],
dest: 'dist/js/ng-countryflags.js'
}
},
uglify: {
target: {
files: {
'dist/js/ng-countryflags.min.js': ['src/countryflags.module.js', 'src/countryflags.directive.js']
}
}
},
copy: {
main: {
files: [{
expand: true,
cwd: 'node_modules/flag-icon-css/flags/',
src: ['**/*.svg'],
dest: 'dist/flags'
}]
}
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('dev',['less', 'concat','copy']);
grunt.registerTask('default',['less', 'cssmin','uglify','copy']);
};