npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

itchpack

v1.2.5

Published

Commandline tool to fetch, templatize, watch and compile itch.io game, profile, and gamejam custom html and css

Downloads

9

Readme

Itchpack

itchpack is a CLI compiler and preprocessor for custom HTML and CSS for Itch.io game, profile, and game jam pages.

Fetch your page content and styles, develop offline with developer-friendly features like live preview, scss, css vendor autoprefixing, and data-driven templates.

asciicast

Features

  • Fetch current page design, content and CSS directly from itch.io as your starting point
  • Preview HTML and CSS changes in your browser with live update
  • Split and organize assets with @import and <include src="myfile.html"></include>
  • [optional] Generate your HTML with pug templates, populated from a data file (json or yaml). Import them with <include src="myfile.pug"></include>
  • Automatically prepend HTML classes with custom-, an itch requirement.
  • Style with SCSS, allowing mixins, CSS variables, math operations etc.
  • CSS vendor autoprefixing
  • Base64 encode small (<100kb) images and fonts in CSS
  • Minify HTML and CSS

Installation

Install node and yarn (or npm).

Install the itchpack command globally:

yarn global add itchpack

Usage

itchpack is designed to create one css file and one html file in an output directory, which you can then copy to your itch.io page.

It expects the following files in your working directory:

  • custom.html: This is where you will add your page's HTML content.
  • custom.scss: This is where you will add your page's styles.
  • template.html: The non-editable wrapper around your custom content.
  • (optional)data.json Or data.yml: Data in this file (one or the other) will be passed to your pug templates, if any.

template.html, custom.html, and custom.scss will all be created for you automatically by the setup command, see below.

HTML files can include the directive <include src="anotherfile.html"></include> to import content from another HTML file, or <include src="anotherfile.pug"></include> to import a pug template.

Pug templates can use conditions and loops, can import other pug templates using their own syntax, and can render your data from a file (data.yml or data.json if available).

If you want to use pug templates exclusively, just add <include src="myfile.pug"><include> as the only content in custom.html.

This requirement may be removed in a future update.

Command reference

$ itchpack [command] [options]

options

--help, -h Show help

--version, -v Show current version

Commands

itchpack setup

$ itchpack setup <url>

Download current styles, page content, and a template from your Itch.io game, profile, or game jam page for local editing.

Creates the following files in the current directory:

  • template.html a wrapper for your content used for previewing
  • custom.scss your current styles (may be empty)
  • custom.html your page's html content

arguments

<url> Url of your Itch.io game, profile, or game jam page.


itchpack serve

Start a local preview server with live reload and launch the default browser

options

--port, -p [optional] Server port (default: 1234)
--host [optional] Server host (default: 127.0.0.1)


itchpack build

Generate custom.html and custom.css files in dist directory.

These can be copied back to itch.io.

options

--no-minify [optional] Disable minification of output HTML and CSS