-
Notifications
You must be signed in to change notification settings - Fork 19
/
Gruntfile.js
41 lines (36 loc) · 1.27 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('/package.json'),
requirejs: {
compile: {
options: {
optimize: 'none',
out: function(text, sourceMapText) {
grunt.file.write('/home/web/django_project/bims/static/js/optimized.js', text);
},
baseUrl: '/home/web/django_project/bims/static/js',
mainConfigFile: '/home/web/django_project/bims/static/js/app.js',
name: 'libs/almond/almond',
include: ['app.js'],
}
}
},
terser: {
options: {
compress: true,
},
main: {
files: {
'/home/web/django_project/bims/static/js/optimized.js': ['/home/web/django_project/bims/static/js/optimized.js'],
}
}
}
});
// Load plugins here.
grunt.loadNpmTasks('grunt-terser');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-requirejs');
// Register tasks here.
grunt.registerTask('default', ['requirejs', 'terser']);
};