Skip to content

Commit

Permalink
[pruning] rm mkdirp dependency (fix #618)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcherny committed Aug 21, 2024
1 parent a1d22d8 commit 108f144
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
15 changes: 0 additions & 15 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"minimist": "^1.2.8",
"mkdirp": "^3.0.1",
"prettier": "^3.2.5"
},
"devDependencies": {
Expand Down
5 changes: 2 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env node

import minimist from 'minimist'
import {readFileSync, writeFileSync, existsSync, lstatSync, readdirSync} from 'fs'
import * as mkdirp from 'mkdirp'
import {readFileSync, writeFileSync, existsSync, lstatSync, readdirSync, mkdirSync} from 'fs'
import {glob} from 'glob'
import isGlob from 'is-glob'
import {join, resolve, dirname} from 'path'
Expand Down Expand Up @@ -119,7 +118,7 @@ function outputResult(result: string, outputPath: string | undefined): void {
process.stdout.write(result)
} else {
if (!isDir(dirname(outputPath))) {
mkdirp.sync(dirname(outputPath))
mkdirSync(dirname(outputPath), {recursive: true})
}
return writeFileSync(outputPath, result)
}
Expand Down

0 comments on commit 108f144

Please sign in to comment.