-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathgruntfile.js
More file actions
38 lines (36 loc) · 764 Bytes
/
gruntfile.js
File metadata and controls
38 lines (36 loc) · 764 Bytes
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
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
var pkg = grunt.file.readJSON('package.json');
grunt.initConfig({
pkg: pkg,
umd: {
all: {
options: {
src: '<%= pkg.src %>',
dest: '<%= pkg.dist.umd %>',
template: 'umd-lite.hbs',
objectToExport: '<%= pkg.exports[0] %>',
amdModuleId: '<%= pkg.name %>'
}
}
},
uglify: {
options:{
banner : '/*! <%= pkg.name %> <%= pkg.version %> <%= pkg.copyright %> License: <%= pkg.license %> */',
mangle: {
except: pkg.exports.concat(['u','m','d'])
},
sourceMap: true
},
admin: {
files: {
'<%= pkg.dist.min %>': ['<%= pkg.dist.umd %>']
}
}
},
});
grunt.registerTask('default', [
'umd',
'uglify',
]);
}