From 789850ab54dd7a0f7c9ac9fb174a8d589724d4f0 Mon Sep 17 00:00:00 2001 From: Sebastian Gebhardt Date: Mon, 9 Sep 2019 21:24:22 +0200 Subject: [PATCH] Added definition file generation to the webpack output --- .gitignore | 3 ++- package.json | 1 + tsconfig.json | 32 +++++++++++++++++--------------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 208481a..063c4b8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ npm-debug.log dist typings lib/*.map -.vscode \ No newline at end of file +lib/**/*.d.ts +.vscode diff --git a/package.json b/package.json index 80d1ef4..c117afc 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "url": "https://github.com/nhabuiduc/react-filter-box" }, "main": "lib/react-filter-box.js", + "types": "./lib/ReactFilterBox.d.ts", "keywords": [ "react-component", "react", diff --git a/tsconfig.json b/tsconfig.json index 6d3ca54..3514a7b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,16 +1,18 @@ { - "compilerOptions": { - "noImplicitAny": true, - "removeComments": true, - "skipLibCheck": true, - "jsx": "react" - // "allowSyntheticDefaultImports":true - }, - "awesomeTypescriptLoaderOptions": { - /* ... */ - }, - "exclude": [ - "node_modules", - "wwwroot" - ] -} \ No newline at end of file + "compilerOptions": { + "noImplicitAny": true, + "removeComments": true, + "skipLibCheck": true, + "jsx": "react", + "target": "es5", + "module": "commonjs", + "sourceMap": true, + "declaration": true, + "outDir": "lib" + // "allowSyntheticDefaultImports":true + }, + "awesomeTypescriptLoaderOptions": { + /* ... */ + }, + "exclude": ["node_modules", "lib"] +}