ftruncateSync insted of rmSync, update package.json

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2022-06-05 00:06:06 +07:00
parent a359b47b84
commit dfaafa1b3f
2 changed files with 18 additions and 9 deletions

View File

@@ -63,7 +63,8 @@ getDirectories(argv.res, (err, res) => {
// Checking file for existing, if exists - deleting it
try {
fs.accessSync(newFilePath);
fs.rmSync(newFilePath);
//fs.rmSync(newFilePath);
fs.ftruncateSync(newFilePath);
} catch (err) {
// console.log("access err: " + err);
}

View File

@@ -1,10 +1,18 @@
{
"dependencies": {
"chalk": "^4.1.2",
"fs-extra": "^10.0.0",
"glob": "^7.2.0",
"mta-tea": "^1.0.0",
"ora": "^5.4.1",
"yargs": "^17.3.1"
}
"name": "MTA model encoder",
"version": "1.0.0",
"main": "index.js",
"private": "true",
"scripts": {
"build": "pkg --target node16-win-x64 --compress GZip index.js"
},
"dependencies": {
"chalk": "^4.1.2",
"fs-extra": "^10.0.0",
"glob": "^7.2.0",
"mta-tea": "^1.0.0",
"ora": "^5.4.1",
"yargs": "^17.3.1"
},
"author": "JDM17 <30170278+JDM170@users.noreply.github.com> (https://github.com/JDM170/model_coder)"
}