lib/output/website/copyPluginAssets.js
function copyAssets(output, plugin) {
    var logger = output.getLogger();
    var pluginRoot = plugin.getPath();
    var options = output.getOptions();

    var outputRoot = options.get('root');
    var assetOutputFolder = path.join(outputRoot, 'gitbook');
    var prefix = options.get('prefix');

    var assetFolder = path.join(pluginRoot, ASSET_FOLDER, prefix);

    if (!fs.existsSync(assetFolder)) {
        return Promise();
    }

    logger.debug.ln('copy assets from theme', assetFolder);
    return fs.copyDir(
        assetFolder,
        assetOutputFolder,
        {
            deleteFirst: false,
            overwrite: true,
            confirm: true
        }
    );
}
function copyAssets(output, plugin) {
    var logger = output.getLogger();
    var pluginRoot = plugin.getPath();
    var options = output.getOptions();

    var outputRoot = options.get('root');
    var assetOutputFolder = path.join(outputRoot, 'gitbook');
    var prefix = options.get('prefix');

    var assetFolder = path.join(pluginRoot, ASSET_FOLDER, prefix);

    if (!fs.existsSync(assetFolder)) {
        return Promise();
    }

    logger.debug.ln('copy assets from theme', assetFolder);
    return fs.copyDir(
        assetFolder,
        assetOutputFolder,
        {
            deleteFirst: false,
            overwrite: true,
            confirm: true
        }
    );
}
function copyAssets ( output , plugin ) { var logger = output . getLogger ( ) ; var pluginRoot = plugin . getPath ( ) ; var options = output . getOptions ( ) ; var outputRoot = options . get ( 'root' ) ; var assetOutputFolder = path . join ( outputRoot , 'gitbook' ) ; var prefix = options . get ( 'prefix' ) ; var assetFolder = path . join ( pluginRoot , ASSET_FOLDER , prefix ) ; if ( ! fs . existsSync ( assetFolder ) ) { return Promise ( ) ; } logger . debug . ln ( 'copy assets from theme' , assetFolder ) ; return fs . copyDir ( assetFolder , assetOutputFolder , { deleteFirst : false , overwrite : true , confirm : true } ) ; }
Copy assets from a plugin

@param {Plugin}
@return {Promise}
Copy assets from a plugin