mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-17 16:15:22 +00:00
22 lines
529 B
JavaScript
22 lines
529 B
JavaScript
var svgToImg = require('./svgToImg');
|
|
var svgToPng = require('./svgToPng');
|
|
var fetchRemoteImages = require('./fetchRemoteImages');
|
|
|
|
var Promise = require('../../utils/promise');
|
|
|
|
/**
|
|
Inline all assets in a page
|
|
|
|
@param {String} rootFolder
|
|
*/
|
|
function inlineAssets(rootFolder) {
|
|
return function($) {
|
|
return Promise()
|
|
.then(fetchRemoteImages.bind(null, rootFolder))
|
|
.then(svgToImg.bind(null, rootFolder))
|
|
.then(svgToPng.bind(null, rootFolder));
|
|
};
|
|
}
|
|
|
|
module.exports = inlineAssets;
|