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

@fed1/dothtma

v1.0.0-preview.2

Published

WARNING: DO NOT USE! This library does not have a stable release yet.

Downloads

7

Readme

.HTMA

WARNING: DO NOT USE! This library does not have a stable release yet.

A library and command-line tool for creating HTMA files.

What is .HTMA?

HTMA stands for Hypertext Markup Application. A .htma file is basically a packaged, frontend-only web app that can be run by an HTMA runner (yet to be released).

Goals of this project

  • Provide a library that allows the creation of HTMA files
  • Provide a simple command-line utility that can create HTMA files and check whether a file is an HTMA file and what version of the HTMA format it uses
  • The HTMA format bundles all resources in a directory so that the files can be run as a sandboxed web app by an HTMA runner
  • Make it easy for other projects to use the .HTMA library to provide HTMA exports to their users; therefore, the project is licensed under the most permissive license possible, MIT-0, because it allows the code to be copied without requiring attribution
  • The HTMA format should be considered read-only; therefore, we do not offer any way to modify an existing HTMA file after it has been created. Any data created while running the HTMA file in an HTMA runner is supposed to be stored separately from the application files, and the runner is not supposed to extract and save files contained within and HTMA archive.

HTMA JSON header

Each HTMA file contains a JSON header that gives the HTMA runner general information about the app such as its name and the initial properties of the app's main window.

The .HTMA library reads a projects package.jsonfile to construct this header information.

The package.json file can have these HTMA-specific properties:

{
    "htma": {
        "app": {
            "name": "My App",
            "debug": false,
            "logging": true
        },
        "window": {
            "width": 1100,
            "height": 800,
            "icon": "/icon.png",
            "fullscreen": false,
            "resizable": true
        },
        "ignore": [
            "/old/",
            "/node_modules/"
        ],
        "include": [
            "/node_modules/@fed1/"
        ]
    }
}

Installation

Installing .HTMA as a dependency for your project:

npm i --save @fed1/dothtma

Installing .HTMA as a command-line tool:

npm i -g @fed1/dothtma

Command-line usage

Packaging all the resources in a directory my_folder as an HTMA file named app.htma:

dothtma pack my_folder app.htma

Checking if a file app.htma is indeed an HTMA file:

dothtma check app.htma