Skip to content

Commit

Permalink
Fixed bug with script concatenation first not deleting file
Browse files Browse the repository at this point in the history
  • Loading branch information
devin committed Jun 4, 2015
1 parent 6a411fc commit 33424e0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 27 deletions.
17 changes: 3 additions & 14 deletions assets/js/frontend/give.all.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions give.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
* Author: WordImpress
* Author URI: http://wordimpress.com
* Version: 0.9.0 beta
* Version: 0.9.5 beta
* Text Domain: give
* Domain Path: /languages
*
Expand Down Expand Up @@ -156,7 +156,7 @@ private function setup_constants() {

// Plugin version
if ( ! defined( 'GIVE_VERSION' ) ) {
define( 'GIVE_VERSION', '0.9.0' );
define( 'GIVE_VERSION', '0.9.5' );
}

// Plugin Folder Path
Expand Down
25 changes: 14 additions & 11 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
------------------------------------- */
var gulp = require( 'gulp' ),
gutil = require( 'gulp-util' ),
del = require( 'del' ),
autoprefixer = require( 'gulp-autoprefixer' ),
uglify = require( 'gulp-uglify' ),
sass = require( 'gulp-sass' ),
Expand Down Expand Up @@ -97,17 +98,19 @@ gulp.task( 'scripts', function () {
.pipe( livereload() );
} );

gulp.task( 'concat_scripts', function () {
return gulp.src( source_paths.frontend_scripts )
.pipe( uglify( {
preserveComments: 'all'
} ) )
.pipe( concat( 'give.all.min.js' ) ) //Add all compressed frontend JS scripts into one minified file for production
.pipe( gulp.dest( 'assets/js/frontend' ) )
.pipe( notify( {
message: 'Concat scripts task complete!',
onLast : true //only notify on completion of task (prevents multiple notifications per file)
} ) )
gulp.task( 'concat_scripts', function ( cb ) {
del( [
'assets/js/frontend/give.all.min.js'
], function () {
return gulp.src( source_paths.frontend_scripts )
.pipe( concat( 'give.all.min.js' ) ) //Add all compressed frontend JS scripts into one minified file for production
.pipe( gulp.dest( 'assets/js/frontend' ) )
.pipe( notify( {
message: 'Concat scripts task complete!',
onLast : true //only notify on completion of task (prevents multiple notifications per file)
} ) )
} );

} );

/* Watch Files For Changes
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"devDependencies": {
"gulp": "^3.8.10",
"gulp-autoprefixer": "^2.0.0",
"del": "^1.2.0",
"gulp-concat": "~2.1.7",
"gulp-minify-css": "^0.3.11",
"gulp-notify": "~2.1.0",
Expand Down

0 comments on commit 33424e0

Please sign in to comment.