mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Replace mkdirp with native fs.mkdirSync({ recursive: true }) (#1384)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import * as fs from 'fs';
|
||||
import * as mkdirp from 'mkdirp';
|
||||
import * as path from 'path';
|
||||
|
||||
import { TInputCLIOptions } from '../../types/options/TInputCLIOptions';
|
||||
@@ -135,7 +134,7 @@ export class ObfuscatedCodeFileUtils {
|
||||
* @param {string} data
|
||||
*/
|
||||
public writeFile(outputPath: string, data: string): void {
|
||||
mkdirp.sync(path.dirname(outputPath));
|
||||
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
|
||||
|
||||
fs.writeFileSync(outputPath, data, {
|
||||
encoding: JavaScriptObfuscatorCLI.encoding
|
||||
|
||||
Reference in New Issue
Block a user