Tone.js/scripts/generate_docs.js

14 lines
416 B
JavaScript
Raw Normal View History

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();