forked from biggora/express-useragent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
40 lines (36 loc) · 1.11 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
/**
* Created by Alex on 5/14/2015.
*/
module.exports = function(grunt) {
'use strict';
// Force use of Unix newlines
grunt.util.linefeed = '\n';
grunt.file.defaultEncoding = 'utf8';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
banner: '/*!\n' +
' * express-useragent.js v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' +
' * Licensed under <%= _.pluck(pkg.licenses, "type") %> (<%= _.pluck(pkg.licenses, "url") %>)\n' +
' */\n',
clean: {
build: ["lib/*.min.js"]
},
uglify: {
options: {
banner: '<%= banner %>'
},
forbrowser: {
src: 'lib/<%= pkg.name %>.js',
dest: 'lib/<%= pkg.name %>.min.js'
}
}
});
var loader = require('load-grunt-tasks');
loader(grunt, {scope: 'devDependencies'});
grunt.registerTask('build', [
'clean:build',
'uglify'
]);
grunt.registerTask('default', 'build');
};