mirror of
https://github.com/HeyPuter/browser.js.git
synced 2026-11-13 20:12:38 -10:00
16 lines
461 B
JavaScript
16 lines
461 B
JavaScript
const fs = require('licia/fs')
|
|
const promisify = require('licia/promisify')
|
|
const mkdir = promisify(require('licia/mkdir'))
|
|
const path = require('path')
|
|
|
|
async function copyDefinition() {
|
|
const data = await fs.readFile(path.resolve(__dirname, '../src/index.d.ts'))
|
|
const dist = path.resolve(__dirname, '../dist')
|
|
if (!(await fs.exists(dist))) {
|
|
await mkdir(dist)
|
|
}
|
|
await fs.writeFile(path.resolve(dist, 'chobitsu.d.ts'), data)
|
|
}
|
|
|
|
copyDefinition()
|