mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 16:48:00 +00:00
14 lines
416 B
JavaScript
14 lines
416 B
JavaScript
|
const { resolve } = require("path");
|
||
|
const { execSync } = require("child_process");
|
||
|
const { appendFileSync } = require("fs");
|
||
|
|
||
|
function generateTypeScriptDefinition(){
|
||
|
//generate the d.ts file
|
||
|
execSync(`./node_modules/.bin/jsdoc -c ${resolve(__dirname, "./.tsdoc.json")}`);
|
||
|
|
||
|
//append an export to the end
|
||
|
appendFileSync(resolve(__dirname, "../tone.d.ts"), "\nexport = Tone;");
|
||
|
}
|
||
|
|
||
|
generateTypeScriptDefinition();
|