Unfortunately, it doesn't yet have CLI support. Thus, I need to install npm packages like inliner and
run them via javascript in the app. I modified the example on inliner's github and the script below worked
somewhat (some of my .js and images were inclined) but not all of them:
var Inliner = require('inliner');
const fs = require('fs');
new Inliner('./rpssl/index.html', function (error, html) {
fs.writeFile("./testIndex.html", html, function(err) {
if(err) {
return console.log(err);
} else {
console.log("The file was saved!");
}
});
});
The directory I set up for inliner to parse looks like this:
It looks like most who have written in issues have been using the command line so would appreciate any assistance you could provide in terms of how I would set up inliner in the .js script I wrote to be able to parse the different directories to inline their contents into the single file "testIndex.html"
Hi and thanks for making the very useful inliner package!
I a mobile programmer and javascript novice and recently began using node.js ported to iOS (iPad): https://apps.apple.com/us/app/node-js-lab/id1550710789
Unfortunately, it doesn't yet have CLI support. Thus, I need to install npm packages like inliner and run them via javascript in the app. I modified the example on inliner's github and the script below worked somewhat (some of my .js and images were inclined) but not all of them:
The directory I set up for inliner to parse looks like this:
It looks like most who have written in issues have been using the command line so would appreciate any assistance you could provide in terms of how I would set up inliner in the .js script I wrote to be able to parse the different directories to inline their contents into the single file "testIndex.html"
Thanks :-)