-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
executable file
·60 lines (57 loc) · 1.65 KB
/
Copy pathGruntfile.js
File metadata and controls
executable file
·60 lines (57 loc) · 1.65 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
"use strict";
module.exports = function(grunt) {
// Load all grunt tasks.
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-concat-css');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
// If any .less file changes in directory "less" then run the "less" task.
files: "less/*.less",
tasks: ["less"]
},
less: {
// Production config is also available.
development: {
options: {
// Specifies directories to scan for @import directives when parsing.
// Default value is the directory of the source, which is probably what you want.
paths: ["less/"],
compress: true
},
files: {
"styles.css": "less/styles.less"
}
}
},
uglify: {
options: {
banner: '/*\n <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> \n*/\n'
},
build: {
files: {
'amd/build/videodatabase.min.js': [
'amd/src/videodatabase.js',
'amd/src/select2.min.js'
]
}
}
},
concat_css: {
options: {},
all: {
src: ["css/*.css"],
dest: "styles.css"
}
},
});
// The default task (running "grunt" in console).
grunt.registerTask("default", ["uglify", "concat_css"]);
};