fix(): add build tsconfig & add main/types

This commit is contained in:
Morb0 2021-01-03 15:52:50 +03:00
parent e75415340b
commit 90cb548551
8 changed files with 11 additions and 12 deletions

1
.gitignore vendored
View File

@ -1,5 +1,4 @@
# lock # lock
package-lock.json
yarn.lock yarn.lock
# dependencies # dependencies

View File

@ -1,6 +1,5 @@
# source # source
lib lib
index.ts
package-lock.json package-lock.json
tsconfig.json tsconfig.json
.prettierrc .prettierrc

1
index.d.ts vendored
View File

@ -1 +0,0 @@
export * from './dist';

View File

@ -1,6 +0,0 @@
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
exports.__esModule = true;
__export(require("./dist"));

View File

@ -1 +0,0 @@
export * from './dist';

View File

@ -1,6 +1,8 @@
{ {
"name": "nestjs-telegraf", "name": "nestjs-telegraf",
"version": "2.0.0", "version": "2.0.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"description": "Telegraf module for NestJS", "description": "Telegraf module for NestJS",
"keywords": [ "keywords": [
"nest", "nest",
@ -25,7 +27,7 @@
], ],
"repository": "git@github.com:bukhalo/nestjs-telegraf.git", "repository": "git@github.com:bukhalo/nestjs-telegraf.git",
"scripts": { "scripts": {
"build": "rm -rf dist && tsc -p tsconfig.json", "build": "rm -rf dist && tsc -p tsconfig.build.json",
"precommit": "lint-staged", "precommit": "lint-staged",
"prepublish:npm": "npm run build", "prepublish:npm": "npm run build",
"publish:npm": "npm publish --access public", "publish:npm": "npm publish --access public",

7
tsconfig.build.json Normal file
View File

@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./lib"
},
"include": ["lib/**/*"]
}

View File

@ -13,6 +13,6 @@
"outDir": "./dist", "outDir": "./dist",
"skipLibCheck": true "skipLibCheck": true
}, },
"include": ["lib/**/*", "./sample/**/*", "../index.ts"], "include": ["lib/**/*", "./sample/**/*"],
"exclude": ["node_modules", "**/*.spec.ts"] "exclude": ["node_modules", "**/*.spec.ts"]
} }