Socket
Socket
Sign inDemoInstall

flachpack

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flachpack

Transform some HTML files into a tiny website!


Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 06 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc