mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
13 lines
416 B
JavaScript
13 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();
|