d8e
v0.6.5
Published
CLI tool for bundling a static, vanilla site.
Readme
d8e
A node CLI tool for bundling/preparing a static HTML website for deployment.
Setup
1. npm install -g d8e@latest
2. Create a config file called .d8e - in the root of your project - like:
{
"inputDirectory": "src2",
"outputDirectory": "dist",
"verbose": false
}3. Structure your codebase like this:
<inputDirectory>
-> index.html
-> style
-> main.css
-> asset
-> video
-> img
-> font NOTE:
- Code AND assets must be placed inside
<inputDirectory> - Images must be placed inside
<inputDirectory>/asset/img - Videos must be placed inside
<inputDirectory>/asset/video - Fonts must be placed inside
<inputDirectory>/asset/font - JavaScript inside
<inputDirectory>/script
4. Run d8e b
How It Works
- Traverse all HTML files - in the specified
inputDirectory(which is defined in.d8e) - Convert all JS & CSS into inline HTML scripts
- Minify the JS, CSS & HTML
- Copy the HTML files - and any images & fonts - to the specified outputDirectory (in
.d8e)
