17 lines
442 B
JavaScript
17 lines
442 B
JavaScript
import * as dts from 'dts-bundle';
|
|
import path from 'path';
|
|
|
|
const currentPath = process.cwd();
|
|
const packagePath = path.join(currentPath, 'script/package/package.json');
|
|
|
|
const mainPath = path.join(currentPath, 'src/type.ts');
|
|
const outPath = path.join(currentPath, 'types/index.d.ts');
|
|
// node script/dts/index.mjs
|
|
dts.bundle({
|
|
name: 'my-library',
|
|
main: mainPath,
|
|
out: outPath,
|
|
removeSource: true,
|
|
outputAsModuleFolder: true,
|
|
});
|