From 994e0df96267b3de4d82926555ac4c4c7eefe14a Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 2 Dec 2020 06:07:47 +0300 Subject: feat: add build script --- .gitignore | 1 + package.json | 7 ++++--- tsconfig.release.json | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 tsconfig.release.json diff --git a/.gitignore b/.gitignore index 37d7e73..e6367a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules .env +dist diff --git a/package.json b/package.json index f4d73da..c62115a 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { "name": "mongo-cronjob", - "version": "0.0.0", + "version": "0.1.0", "description": "Cron-based job scheduler integrated with mongoDB", - "main": "index.js", + "main": "dist/index.js", "scripts": { "lint": "eslint .", - "test": "mocha test/**/*.test.ts" + "test": "mocha test/**/*.test.ts", + "build": "rm -rf dist && tsc --project tsconfig.release.json" }, "author": "eug-vs", "license": "MIT", diff --git a/tsconfig.release.json b/tsconfig.release.json new file mode 100644 index 0000000..b85035f --- /dev/null +++ b/tsconfig.release.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "outDir": "dist", + "target": "es5", + "module": "commonjs", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "noImplicitThis": false, + "declaration": true, + "listEmittedFiles": true + }, + "include": ["lib"] +} -- cgit v1.2.3