Skip to content

Commit

Permalink
fix: change path of dts file
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenngoclongdev committed Jul 12, 2023
1 parent 630079c commit 9c2feb4
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const { Generator } = require('npm-dts');
const { dependencies: pkgDependencies, peerDependencies: pkgPeerDependencies } = require('./package.json');
const fs = require('fs');
const path = require('path');
const { copy } = require('esbuild-plugin-copy');

const dependencies = pkgDependencies || {};
const peerDependencies = pkgPeerDependencies || {};
Expand All @@ -15,6 +16,16 @@ const sharedConfig = {
bundle: true,
minify: true,
sourcemap: isDev,
plugins: [
copy({
resolveFrom: 'cwd',
assets: {
from: ['index.d.ts'],
to: ['dist/index.d.ts']
},
watch: true
})
],
external: Object.keys(dependencies).concat(Object.keys(peerDependencies))
};

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"esbuild": "^0.18.4",
"esbuild-plugin-copy": "^2.1.1",
"eslint": "^8.43.0",
"glob": "^10.2.7",
"jest": "^29.5.0",
Expand Down
71 changes: 71 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9c2feb4

Please sign in to comment.