function copyWebResource(source, dest, regex, type, generator, opt = {}, template) {
    if (generator.enableTranslation) {
        generator.template(source, dest, generator, opt);
    } else {
        renderContent(source, generator, generator, opt, body => {
            body = body.replace(regex, '');
            switch (type) {
                case 'html':
                    body = replacePlaceholders(body, generator);
                    break;
                case 'js':
                    body = replaceTitle(body, generator);
                    break;
                case 'jsx':
                    body = replaceTranslation(body, generator);
                    break;
                default:
                    break;
            }
            generator.fs.write(dest, body);
        });
    }
}
function copyWebResource(source, dest, regex, type, generator, opt = {}, template) {
    if (generator.enableTranslation) {
        generator.template(source, dest, generator, opt);
    } else {
        renderContent(source, generator, generator, opt, body => {
            body = body.replace(regex, '');
            switch (type) {
                case 'html':
                    body = replacePlaceholders(body, generator);
                    break;
                case 'js':
                    body = replaceTitle(body, generator);
                    break;
                case 'jsx':
                    body = replaceTranslation(body, generator);
                    break;
                default:
                    break;
            }
            generator.fs.write(dest, body);
        });
    }
}
function copyWebResource ( source , dest , regex , type , generator , opt = { } , template ) { if ( generator . enableTranslation ) { generator . template ( source , dest , generator , opt ) ; } else { renderContent ( source , generator , generator , opt , body => { body = body . replace ( regex , '' ) ; switch ( type ) { case 'html' : body = replacePlaceholders ( body , generator ) ; break ; case 'js' : body = replaceTitle ( body , generator ) ; break ; case 'jsx' : body = replaceTranslation ( body , generator ) ; break ; default : break ; } generator . fs . write ( dest , body ) ; } ) ; } }
Copy web resources

@param {string} source source
@param {string} dest destination
@param {regex} regex regex
@param {string} type type of resource (html, js, etc)
@param {object} generator reference to the generator
@param {object} opt options
@param {any} template template
Copy web resources
Copy a web resource to a destination