Skip to content

Commit

Permalink
Fix tests on Node 12
Browse files Browse the repository at this point in the history
Node 12 and below don't have the `fs.rmSync` or `fs.rm` functions, and
has limited support for removing a directory recursively. Instead we
use `del`, which we include as a dependency anyway.
  • Loading branch information
BenSurgisonGDS committed May 20, 2022
1 parent 6b00c53 commit af377c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/run-tasks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const colour = require('nodemon/lib/utils/colour')
const del = require('del')
const fs = require('fs')
const fse = require('fs-extra')
const path = require('path')
Expand All @@ -25,8 +26,7 @@ function runTasks () {

function clean () {
// doesn't clean extensions.scss, should it?
fs.rmSync('public', { recursive: true, force: true })
fs.rmSync('.port.tmp', { force: true })
del.sync(['public/**', '.port.tmp'])
}

function sassExtensions () {
Expand Down

0 comments on commit af377c6

Please sign in to comment.