Skip to content

Commit

Permalink
Merge pull request #15925 from Snuffleupagus/update-rimraf
Browse files Browse the repository at this point in the history
Update `rimraf` to version 4
  • Loading branch information
timvandermeij authored Jan 15, 2023
2 parents 1ca0a7a + 32357e3 commit 0e563ee
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 149 deletions.
30 changes: 14 additions & 16 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const rename = require("gulp-rename");
const replace = require("gulp-replace");
const mkdirp = require("mkdirp");
const path = require("path");
const rimraf = require("rimraf");
const { rimraf } = require("rimraf");
const stream = require("stream");
const exec = require("child_process").exec;
const spawn = require("child_process").spawn;
Expand Down Expand Up @@ -1461,22 +1461,19 @@ gulp.task(
)
);

gulp.task("jsdoc", function (done) {
gulp.task("jsdoc", async function (done) {
console.log();
console.log("### Generating documentation (JSDoc)");

const JSDOC_FILES = ["src/display/api.js"];

rimraf(JSDOC_BUILD_DIR, function () {
mkdirp(JSDOC_BUILD_DIR).then(function () {
const command =
'"node_modules/.bin/jsdoc" -d ' +
JSDOC_BUILD_DIR +
" " +
JSDOC_FILES.join(" ");
exec(command, done);
});
});
await rimraf(JSDOC_BUILD_DIR);
await mkdirp(JSDOC_BUILD_DIR);

const command = `"node_modules/.bin/jsdoc" -d ${JSDOC_BUILD_DIR} ${JSDOC_FILES.join(
" "
)}`;
exec(command, done);
});

gulp.task("types", function (done) {
Expand Down Expand Up @@ -2083,11 +2080,12 @@ gulp.task(
)
);

gulp.task("clean", function (done) {
gulp.task("clean", async function (done) {
console.log();
console.log("### Cleaning up project builds");

rimraf(BUILD_DIR, done);
await rimraf(BUILD_DIR);
done();
});

gulp.task("importl10n", function (done) {
Expand Down Expand Up @@ -2254,7 +2252,7 @@ gulp.task(

console.log();
console.log("### Overwriting all files");
rimraf.sync(path.join(DIST_DIR, "*"));
rimraf.sync(DIST_DIR);

return merge([
packageJson().pipe(gulp.dest(DIST_DIR)),
Expand Down Expand Up @@ -2446,7 +2444,7 @@ gulp.task(
// The mozcentral baseline directory is a Git repository, so we
// remove all files and copy the current mozcentral build files
// into it to create the diff.
rimraf.sync(MOZCENTRAL_BASELINE_DIR + "*");
rimraf.sync(MOZCENTRAL_BASELINE_DIR);

gulp
.src([BUILD_DIR + "mozcentral/**/*"])
Expand Down
Loading

0 comments on commit 0e563ee

Please sign in to comment.