build: separate code and types build folder

This commit is contained in:
Hazork 2021-10-25 15:38:03 -03:00
parent cc23204a79
commit ede19c1f33
6 changed files with 31 additions and 25 deletions

View File

@ -1,4 +1,5 @@
/node_modules
/dist
/ignore
/node_modules
/dist
/types
/ignore
/docs

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
/node_modules
/dist
/types
/ignore
/.vscode/settings.json
/package-lock.json

View File

@ -1,20 +1,21 @@
# White-list approach
*
!LICENSE
!README.md
!package.json
!tsconfig.json
!.gitignore
!.prettierrc
!.prettierignore
!.eslintrc
!.eslintignore
!/src/**
!/dist/**
# White-list approach
*
!LICENSE
!README.md
!package.json
!tsconfig.json
!.gitignore
!.prettierrc
!.prettierignore
!.eslintrc
!.eslintignore
!/src/**
!/dist/**
!/types/**

View File

@ -2,5 +2,6 @@
/node_modules
/coverage
/dist
/types
/CHANGELOG.md
/tsconfig.json

View File

@ -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",

View File

@ -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. */