Revert to fs-extra version of ensureDirSync just to be safe
This commit is contained in:
parent
0391559000
commit
a163917428
12
index.js
12
index.js
@ -1,6 +1,6 @@
|
||||
//Modules
|
||||
const AdmZip = require('adm-zip');
|
||||
const { emptyDirSync } = require('fs-extra');
|
||||
const { emptyDirSync, ensureDirSync } = require('fs-extra');
|
||||
const path = require('path');
|
||||
const pcbStackup = require('pcb-stackup');
|
||||
const sharp = require('sharp');
|
||||
@ -10,19 +10,9 @@ const {
|
||||
existsSync,
|
||||
accessSync,
|
||||
createReadStream,
|
||||
mkdirSync,
|
||||
chmodSync,
|
||||
constants,
|
||||
} = require('node:fs');
|
||||
|
||||
//ensureDirSync method
|
||||
function ensureDirSync(directory) {
|
||||
if (!existsSync(directory)) {
|
||||
mkdirSync(directory, { recursive: true });
|
||||
chmodSync(directory, 0o644);
|
||||
}
|
||||
}
|
||||
|
||||
//Class definition
|
||||
class ImageGenerator {
|
||||
constructor(folderConfig, imgConfig, layerNames) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user