-
Notifications
You must be signed in to change notification settings - Fork 117
/
Gruntfile.js
38 lines (36 loc) · 1.09 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
/*!
* Bootstrap Ajax Typeahead's Gruntfile
* Copyright 2014 Alexey Gordeyev
* Licensed under MIT (https://github.com/biggora/bootstrap-ajax-typeahead/blob/master/LICENSE)
*/
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: grunt.file.read('./src/banner.txt'),
concat: {
js: {
options: {
banner: '<%= banner %>'
},
src: ['src/<%= pkg.name %>.js'],
dest: 'js/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
build: {
src: 'src/<%= pkg.name %>.js',
dest: 'js/<%= pkg.name %>.min.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('build', ['concat:js', 'uglify']);
};