Skip to content

Commit d2d113d

Browse files
committed
add css build to Gruntfile.js
1 parent 71146c8 commit d2d113d

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

Gruntfile.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = function (grunt) {
2828
concat: {
2929
options: {
3030
banner: '<%= banner.full %>',
31-
process: function(src) {
31+
process: function (src) {
3232
// remove jslint/jshint options and 'use strict' declaration
3333
return src
3434
.replace(/\/\*js[hl]int.*?\*\/\n/g, '')
@@ -53,11 +53,6 @@ module.exports = function (grunt) {
5353
dest: 'dist/jquery.<%= pkg.name %>.extra.js'
5454
},
5555

56-
simple: {
57-
src: ['src/jquery.<%= pkg.name %>.simple.js'],
58-
dest: 'dist/jquery.<%= pkg.name %>.simple.js'
59-
},
60-
6156
autoload: {
6257
src: ['src/jquery.<%= pkg.name %>.autoload.js'],
6358
dest: 'dist/jquery.<%= pkg.name %>.autoload.js'
@@ -105,11 +100,6 @@ module.exports = function (grunt) {
105100
dest: 'dist/jquery.<%= pkg.name %>.extra.min.js'
106101
},
107102

108-
simple: {
109-
src: '<%= concat.simple.dest %>',
110-
dest: 'dist/jquery.<%= pkg.name %>.simple.min.js'
111-
},
112-
113103
autoload: {
114104
src: '<%= concat.autoload.dest %>',
115105
dest: 'dist/jquery.<%= pkg.name %>.autoload.min.js'
@@ -143,6 +133,18 @@ module.exports = function (grunt) {
143133
dest: 'dist/jquery.<%= pkg.name %>.widget.min.js'
144134
}
145135
},
136+
cssmin: {
137+
minify: {
138+
options: {
139+
banner: '<%= banner.short %>',
140+
report: 'gzip'
141+
},
142+
files: [
143+
{src: 'src/jquery.<%= pkg.name %>.spinner.css', dest: 'dist/jquery.<%= pkg.name %>.spinner.min.css'},
144+
{src: 'src/jquery.<%= pkg.name %>.fadein.css', dest: 'dist/jquery.<%= pkg.name %>.fadein.min.css'}
145+
]
146+
}
147+
},
146148
qunit: {
147149
files: ['test/**/*.html']
148150
},
@@ -188,10 +190,11 @@ module.exports = function (grunt) {
188190
grunt.loadNpmTasks('grunt-contrib-copy');
189191
grunt.loadNpmTasks('grunt-contrib-concat');
190192
grunt.loadNpmTasks('grunt-contrib-uglify');
193+
grunt.loadNpmTasks('grunt-contrib-cssmin');
191194
grunt.loadNpmTasks('grunt-contrib-qunit');
192195
grunt.loadNpmTasks('grunt-contrib-watch');
193196

194197
// Default task.
195-
grunt.registerTask('default', ['jshint', 'clean', 'copy', 'concat', 'uglify', 'qunit']);
198+
grunt.registerTask('default', ['jshint', 'clean', 'copy', 'concat', 'uglify', 'cssmin', 'qunit']);
196199

197200
};

0 commit comments

Comments
 (0)