diff --git a/.eslintignore b/.eslintignore index d356c2f..5ccd3ca 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,5 @@ -/node_modules -/dist -/ignore +/node_modules +/dist +/types +/ignore /docs \ No newline at end of file diff --git a/.gitignore b/.gitignore index 414dfa2..6638232 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /node_modules /dist +/types /ignore /.vscode/settings.json /package-lock.json diff --git a/.npmignore b/.npmignore index 84862fc..92f6ea2 100644 --- a/.npmignore +++ b/.npmignore @@ -1,20 +1,21 @@ -# White-list approach - -* - -!LICENSE -!README.md - -!package.json -!tsconfig.json - -!.gitignore - -!.prettierrc -!.prettierignore - -!.eslintrc -!.eslintignore - -!/src/** -!/dist/** \ No newline at end of file +# White-list approach + +* + +!LICENSE +!README.md + +!package.json +!tsconfig.json + +!.gitignore + +!.prettierrc +!.prettierignore + +!.eslintrc +!.eslintignore + +!/src/** +!/dist/** +!/types/** \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 56823a3..7793f09 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,5 +2,6 @@ /node_modules /coverage /dist +/types /CHANGELOG.md /tsconfig.json \ No newline at end of file diff --git a/package.json b/package.json index ef41c19..5210b6a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,9 @@ "name": "axios-cache-interceptor", "version": "0.4.0", "description": "Cache interceptor for axios", - "main": "dist/index.js", + "main": "./dist/index.js", + "types": "./types/index.d.ts", + "typings": "./types/index.d.ts", "scripts": { "build": "tsc --p tsconfig.build.json", "test": "jest", diff --git a/tsconfig.json b/tsconfig.json index 3d28279..12c5224 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -63,7 +63,7 @@ // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + "declarationDir": "./types", /* Specify the output directory for generated declaration files. */ /* Interop Constraints */ "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */