inline-scripts
inline-scripts copied to clipboard
Inline <script> tags inside HTML files; bundle require dependencies in JS files; replaces references to environment variables with their values in JS files
This adds an optional string input to each of the APIs so they can be chained without having to create temp files: inlineScriptTags('./index.html') .then (htmlString => inlineStylesheets({ htmlPath: './index.html', htmlString...
Fix by @Jamie0 in #8
I have html css and js files stored as string in my memory, the relative paths are known. I want to create a single file by bundling all of them...
I made a couple of improvements to make the scripts work with minified files, which don't have double quotes around HTML attribute values. Also handled paths with leading slashes by...
The RegExp used to match tags are too greedy. If the source file has, for example, multiple link or script tags on the same line, you'll often get garbage output....
The first script I tried, `inline-script-tags`, didn't work on my Ubuntu 20.04 Linux box. I got the following error: /usr/bin/env: ‘node\r’: No such file or directory The `\r` is a...
My first use on import following the instructions led to an error, and it took me a while to figure out. I later realised what I was doing wrong, and...
Script tags such as `` will not work correctly, since when they are inlined they are executed immediately in the document's head. This breaks existing code because deferred scripts assume...