@@ -33,6 +33,7 @@ exports.process = function(opts) {
3333
3434var handle_css = function ( rootpath , backups ) {
3535find . eachfile ( / \. c s s $ / , rootpath , function ( file ) {
36+ if ( path . basename ( file , '.css' ) . endsWith ( 'bak' ) ) return ;
3637var filepath = path . join ( path . dirname ( file ) , path . basename ( file ) ) ;
3738var bakfilename = path . basename ( file , '.css' ) + '-bak.css' ;
3839var bakfilepath = path . join ( path . dirname ( file ) , bakfilename ) ;
@@ -53,6 +54,7 @@ var handle_css = function(rootpath, backups) {
5354
5455var handle_js = function ( rootpath , backups ) {
5556find . eachfile ( / \. j s $ / , rootpath , function ( file ) {
57+ if ( path . basename ( file , '.js' ) . endsWith ( 'bak' ) ) return ;
5658var filepath = path . join ( path . dirname ( file ) , path . basename ( file ) ) ;
5759var bakfilename = path . basename ( file , '.js' ) + '-bak.js' ;
5860var bakfilepath = path . join ( path . dirname ( file ) , bakfilename ) ;
@@ -75,7 +77,7 @@ var handle_js = function(rootpath, backups) {
7577var minify_img = function ( rootpath ) {
7678imagemin ( [ rootpath + '/**/*.{jpg,png}' ] , 'img' , {
7779plugins : [
78- imageminJpegRecompress ( { method : 'smallfry' } ) ,
80+ imageminJpegRecompress ( { method : 'smallfry' } ) , // change the plugin list here, if you want.
7981imageminPngquant ( { quality : '65-80' } )
8082]
8183} ) . then ( files => {
@@ -87,7 +89,7 @@ var minify_img = function(rootpath) {
8789
8890var minify_css = function ( filepath ) {
8991compressor . minify ( {
90- compressor : 'clean-css' ,
92+ compressor : 'clean-css' , // change the compressor method here, if you want.
9193input : filepath ,
9294output : filepath ,
9395options : {
@@ -106,7 +108,7 @@ var minify_css = function(filepath) {
106108
107109var minify_js = function ( filepath ) {
108110compressor . minify ( {
109- compressor : 'gcc' ,
111+ compressor : 'gcc' , // change the compressor method here, if you want.
110112input : filepath ,
111113output : filepath ,
112114callback : function ( err , min ) {
0 commit comments