Pug Pack

screenshot of Pug Pack

Static site generator for developers who like clean formatting, plus a handful of CLI tools using Pug and/or CoffeeScript.

Overview

If you're a developer interested in creating static sites with clean and structured formatting, pug-pack might just be the tool for you. This static site generator leverages Pug.js, allowing you to transform Pug templates into fully functional HTML files. With one goal in mind—clean architecture and concise layout—pug-pack simplifies the process of managing your assets, making it ideal for developers who appreciate clarity in their project structure.

Beyond just template rendering, pug-pack comes built with a variety of command-line interface (CLI) tools that enhance how you work with client-side JavaScript. Its capabilities extend to inline asset management and support for various cleanly-formatted languages, making it versatile for modern web development needs.

Features

  • Seamless Template Conversion: Pug-pack compiles all .pug templates from your source directory into .html files in your distribution folder, maintaining the folder structure for easy navigation.

  • Custom :inject() Filter: The built-in :inject() filter allows you to inline other asset types such as CSS, images, and scripts into your HTML files effortlessly, streamlining your workflow.

  • Support for Various File Types: In addition to Pug files, pug-pack supports multiple formats including .coffee, .styl, .yml, and more, giving you flexibility in how you structure your project.

  • Dynamic Content Injection: Injected content can be generated asynchronously, offering a more dynamic approach compared to standard Pug functionalities.

  • Git Integration: With properties like GIT_HEAD and GIT_TAGS, you can easily access version control information right within your templates, enhancing your collaboration efforts.

  • Asset Management: The src object enables easy access to all asset files, so you can efficiently integrate them into your templates, boosting the coherence of your project's structure.

  • Collision Handling: If your project's files clash with those from pug-pack, the tool prioritizes your versions, ensuring your customizations take precedence.

Pug

Pug is a high-performance template engine for Node.js and browsers that enables developers to write HTML templates using a concise and intuitive syntax. It supports a range of features, including template inheritance, conditionals, loops, mixins, and more, and can be easily integrated into a variety of web frameworks and build tools.