blob: 4106d69917951fba180b9fa4778bf5b9b16dbc5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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, currentFile) {
return function($) {
return Promise()
.then(fetchRemoteImages.bind(null, rootFolder, currentFile))
.then(svgToImg.bind(null, rootFolder, currentFile))
.then(svgToPng.bind(null, rootFolder, currentFile));
};
}
module.exports = inlineAssets;
|