mirror of
https://github.com/KevinMidboe/inline-html.git
synced 2025-12-08 20:29:06 +00:00
16 lines
341 B
JavaScript
16 lines
341 B
JavaScript
var inline = require('../lib');
|
|
var path = require('path');
|
|
var fs = require('fs');
|
|
|
|
var filepath = path.resolve(__dirname, './index.html');
|
|
var options = {};
|
|
/**
|
|
* html -> async -> inlined html
|
|
*/
|
|
inline(filepath, options)
|
|
.then(function (html) {
|
|
console.log(html);
|
|
fs.writeFileSync('./test.html', html);
|
|
})
|
|
.catch(console.error);
|