diff options
author | Johan Preynat <johan.preynat@gmail.com> | 2016-05-04 10:27:21 +0200 |
---|---|---|
committer | Johan Preynat <johan.preynat@gmail.com> | 2016-05-04 10:27:21 +0200 |
commit | be411cd5ff2d5bfc013bf2510cd1496ee343c09a (patch) | |
tree | d47addb68a48be44d45e89e82ab7e927df4b6ef9 | |
parent | 2104019171854d94444788fe38039d5508656689 (diff) | |
download | gitbook-be411cd5ff2d5bfc013bf2510cd1496ee343c09a.zip gitbook-be411cd5ff2d5bfc013bf2510cd1496ee343c09a.tar.gz gitbook-be411cd5ff2d5bfc013bf2510cd1496ee343c09a.tar.bz2 |
Update copyPluginAssets to use prepared resources
-rw-r--r-- | lib/output/website/copyPluginAssets.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/output/website/copyPluginAssets.js b/lib/output/website/copyPluginAssets.js index 9dc876f..9150636 100644 --- a/lib/output/website/copyPluginAssets.js +++ b/lib/output/website/copyPluginAssets.js @@ -78,14 +78,16 @@ function copyAssets(output, plugin) { function copyResources(output, plugin) { var logger = output.getLogger(); - var options = output.getOptions(); - var prefix = options.get('prefix'); + var options = output.getOptions(); var outputRoot = options.get('root'); - var pluginRoot = plugin.getPath(); - var resources = plugin.getResources(prefix); + var state = output.getState(); + var resources = state.getResources(); + + var pluginRoot = plugin.getPath(); + var pluginResources = resources.get(plugin.getName()); - var assetsFolder = resources.get('assets'); + var assetsFolder = pluginResources.get('assets'); var assetOutputFolder = path.join(outputRoot, 'gitbook', plugin.getNpmID()); if (!assetsFolder) { |