This is a simple library that creates a bundle of a simple web page that uses classic `<link ...>` and `<script ...>` way to connect a bunch of CSS and JS files to the HTML template.
npm install static-pages-bundler and way to connect a bunch of CSS and JS files to the HTML template.index.html. All the connected CSS, JS found by their paths in the index.html. Then the data parsed and compressed into three files: index.html, bundle.css and bundle.js.static-pages-bundler uses html-minifier, uglify-es and uglifycss as dependencies.static-pages-bundler tested only on macOS Movaje v10.14.4, Windows 7 Enterprise and Ubuntu 18.04.2 LTS.static-pages-bundler globally, simply run from terminal:
$ npm install -g static-pages-bundler
`
You may remove the
-g flag if you want to install static-pages-bundler as a dev dependency. So, the command will be
`
$ npm i --save-dev static-pages-bundler
`
$3
1. Create a dist folder you're going to run the script from.
You may skip the step, but in the case, you will have to run static-pages-bundler using sudo to give the bundler permissions to create that folder structure for you (running npm libs with sudo is never recommended with any third party lib).
2. In your HTML template setup the entry points for the bundler:
2.1. Wrap your elements that have CSS files imports via CSS comments:
`
... your elements
`
2.2. Wrap your .
5. If you use any assets, then copy folder with them into a place where your new bundle will have access (same relative path as they had previously). static-pages-bundler` doesn't change any links/paths inside your code, so please, make sure all the paths work (paths to images, icons, fonts, etc.).