Skip to content
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.

Commit

Permalink
Make gulp clean up after itself (closes #720)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEnigmaBlade committed Jul 7, 2016
1 parent 0017d54 commit 7ef2194
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@ gulp.task('zip', function() {
.pipe(gulp.dest(dest_dir));
});



gulp.task('xpi', function(cb) {
exec('jpm '+(argv.post === undefined ? "xpi" : "post --post-url "+postUrl), {cwd: src_dir}, function(err, stdout, stderr) {
console.log(stdout);
console.log(stderr);

gulp.src(src_dir+'/*.xpi')
// Move XPI to build dir
var newPaths = gulp.src(src_dir+'/*.xpi')
.pipe(gulp.dest(dest_dir));
// Delete old XPI
gulp.src(src_dir+'/*.xpi')
.pipe(vinylPaths(del));

return newPaths;
});
});

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
},
"license": "Apache-2.0",
"devDependencies": {
"del": "^2.2.1",
"gulp": "^3.9.0",
"gulp-zip": "^3.0.2",
"vinyl-paths": "^2.1.0",
"yargs": "^4.3.2"
}
}

0 comments on commit 7ef2194

Please sign in to comment.