This repository has been archived by the owner on Oct 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Gruntfile.js
48 lines (45 loc) · 1.59 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: [
'resources/components/jquery/jquery.js',
'resources/components/underscore/underscore.js',
'resources/components/bootstrap/docs/assets/js/bootstrap.js',
'resources/components/bootstrap/docs/assets/js/bootstrap-typeahead.js',
'resources/components/bootstrap/docs/assets/js/bootstrap-tooltip.js',
'resources/components/bootstrap/docs/assets/js/bootstrap-popover.js',
'resources/components/jquery-textrange/jquery-textrange.js',
'resources/components/localforage/dist/localforage.js',
'resources/static/js/<%= pkg.name %>.js'
],
dest: 'resources/static/js/<%= pkg.name %>.min.js'
}
},
recess: {
dist: {
src: ['resources/components/bootstrap/less/bootstrap.less',
'resources/static/css/data-api.less'],
dest: 'resources/static/css/data-api.min.css',
options: {
compile: true,
compress: true
}
}
},
watch: {
files: ['Gruntfile.js', 'resources/components/**/*', 'resources/static/**/*'],
tasks: ['default']
}
});
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task.
grunt.registerTask('default', ['recess', 'uglify']);
};