diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-09-05 11:04:18 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-09-05 11:04:18 +0200 |
commit | a14ca3e268e95a7eab59fb205b41da7331d57631 (patch) | |
tree | 9c84b2cbd561345335fca3e26af961b2ea23d8ec /lib/output/modifiers/inlineAssets.js | |
parent | 9c071dade573aa6990878006f83c89b6065a1395 (diff) | |
download | gitbook-a14ca3e268e95a7eab59fb205b41da7331d57631.zip gitbook-a14ca3e268e95a7eab59fb205b41da7331d57631.tar.gz gitbook-a14ca3e268e95a7eab59fb205b41da7331d57631.tar.bz2 |
Switch to lerna
Diffstat (limited to 'lib/output/modifiers/inlineAssets.js')
-rw-r--r-- | lib/output/modifiers/inlineAssets.js | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/output/modifiers/inlineAssets.js b/lib/output/modifiers/inlineAssets.js deleted file mode 100644 index 7cd874b..0000000 --- a/lib/output/modifiers/inlineAssets.js +++ /dev/null @@ -1,29 +0,0 @@ -var svgToImg = require('./svgToImg'); -var svgToPng = require('./svgToPng'); -var inlinePng = require('./inlinePng'); -var resolveImages = require('./resolveImages'); -var fetchRemoteImages = require('./fetchRemoteImages'); - -var Promise = require('../../utils/promise'); - -/** - Inline all assets in a page - - @param {String} rootFolder -*/ -function inlineAssets(rootFolder, currentFile) { - return function($) { - return Promise() - - // Resolving images and fetching external images should be - // done before svg conversion - .then(resolveImages.bind(null, currentFile, $)) - .then(fetchRemoteImages.bind(null, rootFolder, currentFile, $)) - - .then(svgToImg.bind(null, rootFolder, currentFile, $)) - .then(svgToPng.bind(null, rootFolder, currentFile, $)) - .then(inlinePng.bind(null, rootFolder, currentFile, $)); - }; -} - -module.exports = inlineAssets; |