From ee81b8647813be1e2c65ece7e1a2d1b9518bf6a0 Mon Sep 17 00:00:00 2001 From: gillchristian Date: Tue, 23 Apr 2019 14:31:50 +0200 Subject: [PATCH] support(build): Put typings in typings/ Since now there is have more than one generated then the build produces more than one `.d.ts` file. Before this commit `index.d.ts` would be put in the root but with more than one file that is not good. So `.d.ts` files now are placed on `typings/`. --- .gitignore | 2 +- package.json | 4 ++-- tsconfig.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 23c7ce1..38d76e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules/ dist/ coverage/ -index.d.ts +typings/ diff --git a/package.json b/package.json index 87fdab7..c06a0d0 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "module": "./dist/cmjs/index.js", "es2015": "./dist/es2015/index.js", "unpkg": "./dist/umd/index.js", - "typings": "./index.d.ts", + "typings": "./typings/index.d.ts", "sideEffects": false, "repository": { "type": "git", @@ -15,7 +15,7 @@ "author": "Christian Gill ", "license": "MIT", "scripts": { - "build": "yarn build:es2015 && yarn build:umd && yarn build:cmjs", + "build": "yarn build:umd && yarn build:cmjs && yarn build:es2015 ", "build:es2015": "tsc --module es2015 --outDir dist/es2015", "build:umd": "tsc --module umd --outDir dist/umd", "build:cmjs": "tsc --module commonjs --outDir dist/cmjs", diff --git a/tsconfig.json b/tsconfig.json index dc502a9..6bbe8e4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "moduleResolution": "node", "esModuleInterop": true, "declaration": true, - "declarationDir": "./", + "declarationDir": "typings", "rootDir": "src", "allowJs": false, "skipLibCheck": true, @@ -18,5 +18,5 @@ "noUnusedLocals": false }, "include": ["src/*.ts", "!src/*.spec.ts"], - "exclude": ["node_modules", "dist", "index.d.ts", "src/index.spec.ts"] + "exclude": ["node_modules", "dist", "typings", "src/index.spec.ts"] }