updux/Promake
2020-06-02 16:00:48 -04:00

33 lines
650 B
JavaScript
Executable File

#!/usr/bin/env node
const Promake = require('promake');
const glob = require('glob').sync;
const {
task, cli, rule, exec
} = new Promake();
const compile = task( 'compile', rule( 'tsconfig.tsbuildinfo', glob('src/**.ts'),
async () => {
return exec( 'tsc' );
}) );
const docs = task( 'docs', [ rule(
glob('docs/4-API/*.md'),
[ ...glob('./src/**.ts'), compile ], async() => {
await exec( "typedoc src" );
}
)]);
const sidebar = task(
'sidebar',
rule('./docs/_sidebar.md', [...glob('./docs/4-API/**.md'), docs], async () => {
return exec('docsify-auto-sidebar -d docs');
})
);
cli();