-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Gruntfile.js
44 lines (41 loc) · 1.26 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '/*! <%= pkg.name %> v<%= pkg.version %> | <%= pkg.homepage %> */\n'
},
unwrap: {
options: {
base: './src',
globalBase: './src/global_modules',
name: 'dialog',
namespace: 'window',
banner: '<%= meta.banner %>'
},
'dialog.js': {
src: './src/dialog.js',
dest: './dist/dialog.js'
},
'dialog-plus.js': {
src: './src/dialog-plus.js',
dest: './dist/dialog-plus.js'
}
},
uglify: {
options: {
banner: '<%= meta.banner %>'
},
'dialog.js': {
src: './dist/dialog.js',
dest: './dist/dialog-min.js'
},
'dialog-plus.js': {
src: './dist/dialog-plus.js',
dest: './dist/dialog-plus-min.js'
}
}
});
grunt.loadNpmTasks('grunt-unwrap');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['unwrap', 'uglify']);
};