From 6465d8d66a55d3de12a56d31baafa0b856b4371e Mon Sep 17 00:00:00 2001 From: Gonzalo Gluzman Date: Tue, 15 Dec 2020 02:46:32 -0300 Subject: [PATCH] Fixed building and added building npm script --- .gitignore | 2 +- package.json | 6 ++++-- tsconfig.json | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index dd87e2d..f06235c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ node_modules -build +dist diff --git a/package.json b/package.json index 9c1519c..bee5361 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,11 @@ "name": "error-typed-promise", "version": "1.0.0", "description": "TypeScript Promises that are error-typed", - "main": "build/index.ts", - "typings": "build/typings/index.d.ts", + "main": "dist/index.ts", + "typings": "dist/typings/index.d.ts", + "files": ["dist"], "scripts": { + "build": "rm -rf dist && tsc", "test": "npm run test:types", "test:types": "dtslint --localTs node_modules/typescript/lib tests" }, diff --git a/tsconfig.json b/tsconfig.json index 590155c..62a4803 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,11 +11,11 @@ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ "declaration": true, /* Generates corresponding '.d.ts' file. */ - "declarationDir": "./build/typings", + "declarationDir": "./dist/typings", // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ // "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./build", /* Redirect output structure to the directory. */ + "outDir": "./dist", /* Redirect output structure to the directory. */ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */