-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.js
More file actions
52 lines (49 loc) · 1.74 KB
/
Copy pathGruntfile.js
File metadata and controls
52 lines (49 loc) · 1.74 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: ['./node_modules/jspanel4/dist/jspanel.js', './node_modules/jspanel4/dist/extensions/layout/jspanel.layout.js', './node_modules/uikit/dist/js/uikit.js', './node_modules/uikit/dist/js/uikit-icons.js', './src/build/stupid-console.js'],
dest: './dist/stupid-console.js'
}
},
concat_css: {
options: {
// Task-specific options go here.
},
dist : {
src: ['./node_modules/jspanel4/dist/jspanel.css','./node_modules/uikit/dist/css/uikit.css','./src/styles.css'],
dest: "./dist/stupid-console.css"
},
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'./dist/stupid-console.min.js': ['./dist/stupid-console.js']
}
}
},
cssmin: {
target: {
files: [{
expand: true,
cwd: './dist/',
src: ['*.css', '!*.min.css'],
dest: './dist/',
ext: '.min.css'
}]
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-concat-css');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', ['concat_css', 'cssmin', 'concat', 'uglify']);
};