From 44216a3f9e46faeedc42b6908631e55ae80594de Mon Sep 17 00:00:00 2001 From: Moshe Uminer <47164590+mosheduminer@users.noreply.github.com> Date: Thu, 9 Jul 2020 11:47:15 -0400 Subject: [PATCH] configure setup --- .gitignore | 3 +-- index.d.ts | 12 ------------ index.js | 5 ----- package.json | 4 +++- tsconfig.json | 15 +++++---------- 5 files changed, 9 insertions(+), 30 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.js diff --git a/.gitignore b/.gitignore index dd6927b..fd6af3b 100644 --- a/.gitignore +++ b/.gitignore @@ -56,5 +56,4 @@ typings/ .vscode .idea -src/*.js -src/*.d.ts +dist diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 4995b12..0000000 --- a/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Sirix, sirixInit } from "./src/sirix"; -import Database from "./src/database"; -import Resource from "./src/resource"; -import { Insert } from "./src/constants"; -declare const _default: { - Sirix: typeof Sirix; - Database: typeof Database; - Resource: typeof Resource; - sirixInit: typeof sirixInit; - Insert: typeof Insert; -}; -export default _default; diff --git a/index.js b/index.js deleted file mode 100644 index 6c65949..0000000 --- a/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import { Sirix, sirixInit } from "./src/sirix"; -import Database from "./src/database"; -import Resource from "./src/resource"; -import { Insert } from "./src/constants"; -export default { Sirix: Sirix, Database: Database, Resource: Resource, sirixInit: sirixInit, Insert: Insert }; diff --git a/package.json b/package.json index d6448c6..92c6e2a 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,14 @@ "name": "sirix", "version": "1.0.0", "description": "A typescript client library for interacting with SirixDB", - "main": "./index.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "type": "commonjs", "scripts": { "build": "tsc", "test": "jest --runInBand" }, + "prepublish": "tsc", "author": "Moshe Uminer", "license": "ISC", "dependencies": { diff --git a/tsconfig.json b/tsconfig.json index 65b832f..641d3d7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,16 +8,11 @@ "removeComments": true, "preserveConstEnums": true, "target": "es5", - "esModuleInterop": true + "esModuleInterop": true, + "outDir": "./dist" }, - "files": [ - "./src/auth.ts", - "./src/client.ts", - "./src/constants.ts", - "./src/database.ts", - "./src/info.ts", - "./src/resource.ts", - "./src/sirix.ts", - "./index.ts" + "exclude": [ + "__tests__", + "resources" ] } \ No newline at end of file