From b94940e8fd3c019450e168cc848ad78f67c16d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Pluta?= Date: Thu, 14 Nov 2024 14:18:24 +0100 Subject: [PATCH] Create build script --- package-lock.json | 3 +++ package.json | 6 +++++- tsconfig.json | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tsconfig.json diff --git a/package-lock.json b/package-lock.json index f22f655..bb129f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,9 @@ "tough-cookie": "^5.0.0", "yaml": "^2.6.0" }, + "bin": { + "tauron-scrapper": "dist/index.js" + }, "devDependencies": { "@types/node": "^22.9.0", "@types/tough-cookie": "^4.0.5", diff --git a/package.json b/package.json index ebb3200..111b8d7 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,14 @@ "description": "The utility which scrappes the Tauron eLicznik data and pushes it to some services", "main": "index.ts", "scripts": { - "start": "tsx src/index.ts" + "start": "tsx src/index.ts", + "build": "tsc" }, "author": "Bartłomiej Pluta ", "license": "ISC", + "bin": { + "tauron-scrapper": "./dist/index.js" + }, "devDependencies": { "@types/node": "^22.9.0", "@types/tough-cookie": "^4.0.5", diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..0c5f365 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "outDir": "./dist", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "typeRoots": [ + "./src/types", + "./node_modules/@types" + ] + }, + "include": ["src/**/*"], + "exclude": [ + "node_modules", + "src/types" + ] +} \ No newline at end of file