@fed1/dothtma

1.0.0-preview.2 • Public • Published

.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

Readme

Keywords

none

Package Sidebar

Install

npm i @fed1/dothtma

Weekly Downloads

3

Version

1.0.0-preview.2

License

MIT-0

Unpacked Size

21.6 kB

Total Files

16

Last publish

Collaborators

  • yamiyume