flachpack

0.3.0 • Public • Published

Flachpack

Flachpack pipes a directory of HTML files through EJS, Minifier and Terser, resulting in a flat directory of HTML files. Use it to build tiny websites!

I built it for my tiny personal website.

npm i flachpack -g

flachpack -o dist src
# -o / --out:    The output directory
# -w / --watch:  Enable watch mode and serve over BrowserSync
# last argument: The folder containing the HTML files

An example src/index.html:

<html>
  <head>
    <style type="text/css">
      /* inline Sass, SCSS or plain SCSS */
      <%- includeSass('main.scss') %>
    </style>

    <script>
      // inline JavaScript
      <%- include('./script.js') %>
    </script>
  </head>

  <body>
    <!-- reuse some parts! -->
    <%- include('./parts/header.html') %>

    <h1>Hello World!</h1>
  </body>
</html>

Look at the repo for danieldiekmeier.de for a bigger example.

Dependencies (9)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i flachpack

    Weekly Downloads

    0

    Version

    0.3.0

    License

    ISC

    Unpacked Size

    4.48 kB

    Total Files

    3

    Last publish

    Collaborators

    • danieldiekmeier