mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-16 09:10:33 +03:00
24 lines
634 B
JavaScript
24 lines
634 B
JavaScript
const generator = require('./utils/node/generator');
|
|
const {green} = require('chalk');
|
|
|
|
/**
|
|
* Dynamically generates all API documentation with vue-docgen-api.
|
|
* The resulting object can be imported and used client-side via:
|
|
*
|
|
* import documentation from '@dynamic/api'
|
|
*
|
|
* @return {Promise<{name: string, content: string}>}
|
|
*/
|
|
async function clientDynamicModules (sourceDir) {
|
|
const docs = await generator(sourceDir);
|
|
|
|
console.log(green('✅ Generated API documentation for Select.vue'));
|
|
|
|
return {
|
|
name: 'api.js',
|
|
content: `export default ${JSON.stringify(docs)}`,
|
|
};
|
|
}
|
|
|
|
module.exports = clientDynamicModules;
|