From 8e095c8ec013b17689bad40d555b41c94d23e98c Mon Sep 17 00:00:00 2001 From: Louis Lambeau Date: Fri, 10 May 2024 13:21:39 +0200 Subject: [PATCH] Build using tsc. --- package.json | 5 +++-- tsconfig.json | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index db52fdb..6f8079c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "description": "Framework on top of RabbitMQ for easing up the development of producer/consumer/job queues.", "version": "1.0.0-rc.1", "author": "Louis Lambeau ", - "main": "dist/index.js", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "bin": { "arnavon": "./bin/run" }, @@ -20,7 +21,7 @@ "test:watch": "mocha --watch tests", "lint": "tsc && eslint src **/*.ts .eslintrc.js", "lint:fix": "tsc && eslint --fix src tests *.ts .eslintrc.js", - "build": "shx rm -rf dist && babel ./src --out-dir ./dist --source-maps -x .ts", + "build": "shx rm -rf dist && tsc", "build:watch": "babel ./src --watch --out-dir ./dist --source-maps --copy-files -x .ts", "postpack": "shx rm -f oclif.manifest.json", "prepack": "yarn build && oclif manifest && oclif readme", diff --git a/tsconfig.json b/tsconfig.json index d111298..a82365c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,11 @@ { "compilerOptions": { + "rootDir": "src", "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ "module": "commonjs", /* Specify what module code is generated. */ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ "declarationMap": true, /* Create sourcemaps for d.ts files. */ - "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "emitDeclarationOnly": false, /* Only output d.ts files and not JavaScript files. */ "sourceMap": true, /* Create source map files for emitted JavaScript files. */ "outDir": "./dist", /* Specify an output folder for all emitted files. */ "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */