diff --git a/package.json b/package.json index f5f3372..7fed981 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "dev": "npm run build && node samples/rimraf.js && node bin/index.js", "build": "npm run rimraf && tsc", - "rimraf": "node -e \"require('fs').existsSync('dist') && require('fs').rmdirSync('dist', { recursive: true })\"", + "rimraf": "node -e \"require('fs').existsSync('dist') && require('fs').rmSync('dist', { recursive: true })\"", "lint": "eslint --ext .ts . && prettier --check \"./**/*.ts\"", "lint:fix": "eslint --ext .ts . --fix && prettier --write \"./**/*.ts\"", "test": "vitest run", diff --git a/samples/rimraf.js b/samples/rimraf.js index 1d6aee7..daf516e 100644 --- a/samples/rimraf.js +++ b/samples/rimraf.js @@ -1,9 +1,9 @@ -// for $ npm run dev:openapi +// for $ npm run dev require('fs') .readdirSync(__dirname) .filter(n => require('fs').statSync(`${__dirname}/${n}`).isDirectory() && n !== 'docs.baikalplatform.com') .forEach(n => - require('fs').rmdir(`${__dirname}/${n}`, { recursive: true }, err => { + require('fs').rm(`${__dirname}/${n}`, { recursive: true }, err => { if (err) console.log(err) }) )