dicebox
Version:
build tool for typescript based RPG Maker MV plugins
31 lines • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function createDocsForPlugin(conf) {
let comment = '/*:';
const addCommentParam = (param, value) => comment = `${comment}\n` +
` * @${param} ${value}`;
const addCommentSpace = () => comment = `${comment}\n *`;
addCommentParam('plugindesc', conf.name);
if (conf.author) {
addCommentParam('author', conf.author);
}
if (conf.description) {
addCommentParam('help', conf.author);
}
if (conf.parameters) {
addCommentSpace();
conf.parameters.forEach(param => {
addCommentParam('param', param.name);
if (param.description) {
addCommentParam('desc', param.description);
}
if (param.default) {
addCommentParam('default', param.default);
}
});
}
comment = `${comment}\n */`;
return comment;
}
exports.createDocsForPlugin = createDocsForPlugin;
//# sourceMappingURL=docs.js.map