+
Skip to content

mordak/fileproc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fileproc

Webpack-enabled web app that bundles all JS and CSS and outputs a single inlined public/index.html.

Usage

  • Install: npm install
  • Build once: npm run build
  • Watch mode: npm run build:watch The build writes to public/. Only index.html remains after inlining; JS and CSS are embedded directly.

How it works

  • html-webpack-plugin generates index.html from src/index.html.
  • mini-css-extract-plugin emits CSS files, which we then inline.
  • A small custom plugin (webpack/InlineAssetsPlugin.js) replaces injected <link> and <script> tags with <style> and inline <script> content and removes the original assets, leaving a single file output.

Project layout

  • src/ — put your .html, .js, and .css here.
  • public/ — build output (single index.html).
  • webpack/InlineAssetsPlugin.js — the inlining plugin.
  • webpack.config.js — build configuration.

Notes

  • This setup focuses on inlining HTML, JS, and CSS. If you use images or other assets, consider converting them to data URLs or adjusting webpack.config.js to inline them as asset/inline so the output remains a single file.

About

basic file processing scaffolding in js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载