From dfaafa1b3fc4404db039792b2afa36d89b61fd60 Mon Sep 17 00:00:00 2001 From: Lev Rusanov <30170278+JDM170@users.noreply.github.com> Date: Sun, 5 Jun 2022 00:06:06 +0700 Subject: [PATCH] ftruncateSync insted of rmSync, update package.json Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com> --- index.js | 3 ++- package.json | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index ecbac9e..5ad78a0 100644 --- a/index.js +++ b/index.js @@ -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); } diff --git a/package.json b/package.json index 55f933a..1c2f928 100644 --- a/package.json +++ b/package.json @@ -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)" }