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 11, 2023
1 parent 503bbf4 commit 84efcb8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
const { build } = require('esbuild');
const { Generator } = require('npm-dts');
const { dependencies: pkgDependencies, peerDependencies: pkgPeerDependencies } = require('./package.json');
const fs = require("fs");
const fs = require('fs');
const path = require('path');

const dependencies = pkgDependencies || {};
const peerDependencies = pkgPeerDependencies || {};
Expand Down Expand Up @@ -30,7 +31,9 @@ build({
format: 'esm'
});

fs.copyFileSync("./index.d.ts", "dist/index.d.ts");
const source = path.join(__dirname, './index.d.ts');
const target = path.join(__dirname, './dist/index.d.ts');
fs.copyFileSync(source, target);
// new Generator({
// entry: 'src/index.ts',
// output: 'dist/index.d.ts'
Expand Down

0 comments on commit 84efcb8

Please sign in to comment.