src/cli.js
/**
     * Builds the HTML document when crawling is done
     * @param baseurl
     * @param data
     * @param html
     */
Builds the HTML document when crawling is done
@param baseurl
@param data
@param html
Builds the HTML document when crawling is done @param baseurl @param data @param html
function _onComplete(baseurl, data, html)
    {
        if (data.length === 0)
        {
            console.log(colors.red('No pages found'));
            process.exit(1);
        }
        fs.writeFile(`${outputPath}/index.html`, html, {encoding: 'utf8'}, function(error)
        {
            console.log(error ? colors.red('Write error (' + error.message + ')') : colors.green('Report saved'));
            process.exit(error ? 1 : 0);
        });
    }
function _onComplete ( baseurl , data , html ) { if ( data . length === 0 ) { console . log ( colors . red ( 'No pages found' ) ) ; process . exit ( 1 ) ; } fs . writeFile ( ` ${ outputPath } ` , html , { encoding : 'utf8' } , function ( error ) { console . log ( error ? colors . red ( 'Write error (' + error . message + ')' ) : colors . green ( 'Report saved' ) ) ; process . exit ( error ? 1 : 0 ) ; } ) ; }
Builds the HTML document when crawling is done
 @param baseurl
 @param data
 @param html
Builds the HTML document when crawling is done @param baseurl @param data @param html