(opts: BuildOptions = {})
| 64 | * @param {Object} opts |
| 65 | */ |
| 66 | export const buildDeclaration = async (opts: BuildOptions = {}) => { |
| 67 | const filePath = rootResolve('src/index.ts'); |
| 68 | if (!fs.existsSync(filePath)) return; |
| 69 | |
| 70 | printRow('Start building TS declaration file...', { lineDown: 0 }); |
| 71 | |
| 72 | const entry = { filePath, output: { noBanner: true }}; |
| 73 | const bundleOptions = { preferredConfigPath: rootResolve('tsconfig.json') }; |
| 74 | const result = generateDtsBundle([entry], bundleOptions)[0]; |
| 75 | await writeFile(rootResolve('dist/index.d.ts'), result); |
| 76 | |
| 77 | printRow('TS declaration file building completed successfully!'); |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Build the library files |
no test coverage detected