-
Notifications
You must be signed in to change notification settings - Fork 41
/
Gruntfile.js
63 lines (56 loc) · 1.94 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const sass = require('node-sass');
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
usebanner: {
build: {
options: {
position: 'top',
banner: '/*!\n' +
' * <%= pkg.niceName %> v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * \n' +
' * <%= pkg.description %> \n' +
' * \n' +
' * Release v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n' +
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %> \n' +
' * Licensed under <%= pkg.license %> \n' +
' */',
linebreak: true
},
files: {
src: [ 'dist/select2-bootstrap4.css', 'dist/select2-bootstrap4.min.css' ]
}
}
},
sass: {
options: {
implementation: sass,
outputStyle: 'expanded',
sourceMap: false
},
dist: {
files: {
'dist/select2-bootstrap4.css': 'src/build.scss'
}
}
},
cssmin: {
build: {
options: {
level: {
1: {
specialComments: 0
}
}
},
files: {
'dist/select2-bootstrap4.min.css': 'dist/select2-bootstrap4.css'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-banner');
grunt.registerTask('default', ['sass', 'cssmin', 'usebanner']);
};