Skip to content

Commit

Permalink
Replace remove tool (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui authored Aug 5, 2024
2 parents b8dad9e + b777b5e commit 7fab6a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 172 deletions.
7 changes: 4 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var spawn = require('cross-spawn');
const { src, dest , series} = require('gulp');
const fs = require('fs');
const { rimraf, rimrafSync, native, nativeSync } = require('rimraf')
const fsPromises = require('fs').promises;

async function create_command(command) {
command = command.split(" ")
Expand Down Expand Up @@ -92,7 +92,8 @@ async function handle_cache_updates(cb) {
// Remove the temp directory, files here before build should have been taken
// out by the user
if(fs.existsSync(temp_dir)) {
rimraf.sync(temp_dir)
await fsPromises.rmdir(temp_dir, {"recursive": true})
//rimraf.sync(temp_dir)
}

// Make sure resize exists if it doesn't already
Expand Down Expand Up @@ -138,4 +139,4 @@ async function defaultTask(cb) {

exports.default = handle_cache_updates
exports.build = series(update_packages, handle_cache_updates, copy_foundation_files, build)
exports.watch = series(update_packages, handle_cache_updates, copy_foundation_files, dev_build)
exports.watch = series(update_packages, handle_cache_updates, copy_foundation_files, dev_build)
177 changes: 10 additions & 167 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"dependencies": {
"cross-spawn": "^7.0.3",
"del": "^7.1.0",
"foundation-sites": "^6.8.1",
"rimraf": "^5.0.7"
"foundation-sites": "^6.8.1"
}
}

0 comments on commit 7fab6a9

Please sign in to comment.