-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
69 lines (64 loc) · 2.14 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
/**
* Created by dana on 5/3/15.
*/
module.exports = function(grunt) {
grunt.initConfig({
bower_concat: {
components: {
dest: 'js/scripts-bower.js',
cssDest: 'css/styles-bower.css',
mainFiles: {
'cryptojslib': ['rollups/aes.js']
},
exclude: [
'grunt'
]
}
},
concat: {
components: {
src: 'js-ext/**/*.js',
dest: 'js/scripts-ext.js'
}
},
uglify: {
components: {
options: {
mangle: true,
compress: true
},
files: {
'js/scripts-bower.min.js': 'js/scripts-bower.js',
'js/scripts-ext.min.js': 'js/scripts-ext.js',
'js/securephrase.min.js': 'js/securephrase.js'
}
}
},
clean: {
dist: [ 'deploy/**/*.*' ]
},
copy: {
fonts: {
files: [
{
cwd: 'bower_components/bootstrap/dist/fonts/', // set working folder / root to copy
src: '**/*', // copy all files and subfolders
dest: 'fonts/', // destination folder
expand: true // required when using cwd
}
]
},
dist: {
files : [
{ cwd: '', expand: true, src: '*.html', dest: 'dist/' },
{ cwd: 'css', expand: true, src: '*.css', dest: 'dist/css' },
{ cwd: 'fonts', expand: true, src: '*.*', dest: 'dist/fonts' },
{ cwd: 'js', expand: true, src: '*.min.js', dest: 'dist/js' }
]
}
}
});
require('load-grunt-tasks')(grunt);
grunt.registerTask('default', ['concat', 'bower_concat', 'uglify', 'copy:fonts', 'clean', 'copy:dist']);
grunt.registerTask('dist', ['clean:dist', 'copy:dist']);
};