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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ctml

v0.3.4

Published

A clean implementation of HTML.

Readme

Clean Text Markup Language

GitHub version npm version

Clean Text Markup Language, or CTML is a simplified way to do your web coding.

Introduction

I wrote CTML because I was increasingly frustrated with the extra amounts of characters on screen when editing HTML documents.

Imagine if all those extra brackets could simply be removed, and HTML was updated for modern web coding. I have done exactly that with CTML.

Example

Here is an example CTML document:

-html
    -head
        -title
            Example Page
        -
    -
    -body
        -p #1 .par .foo [test="test data spaces"]
            This is some example text!
            Second line.
            Third Line.
        -
    -
-

This is rather simple and elegant.

Installation

CTML can be installed through npm, Node's package management system. It is a command line package, so please install it globally.

npm install -g ctml

Command Line Tools

Included this repository are two tools that allow use of CTML. These are known as ctmlc and ctmld.

ctmlc - The CTML Compiler

The CTML compiler is run by using ctmlc after installing the ctml package globally. ctmlc takes a CTML file and compiles it into HTML. You can execute it with no arguments to see current usage, but the most basic execution runs like this:

ctmlc example.ctml

ctmld - The CTML Decompiler

The CTML decompiler is run by using ctmld after installing the ctml package globally. ctmld isn't really a decompiler as much as it is a converter. It takes an HTML file and will convert it to CTML. It is useful for beginning work with existing HTML files that weren't originally created using CTML. You can execute it with no arguments to see current usage, but the most basic execution runs like ctmlc.

ctmld exampmle.html

Language Syntax

CTML is designed to be a bit more strictly typed, but it simplifies HTML greatly.

Elements

If a line begins with a hyphen character, (-) it is an element. The element name should immediately follow.

Example: -body

ID and classes

You can specify the ID of an element and classes for an element simply by adding the appropriate CSS selector to the line of the element.

For example, to create a paragraph element with the ID 1234 and the classes foo and bar, you can use this syntax:

-p #1234 .foo .bar

Additional Attributes

Additional attributes can be specified by bracket syntax, again similar to CSS selectors.

-p [style="display:none;"]

You can define a boolean attribute by using syntax like:

-input [disabled]

If you have simple values for an attribute, you are not required to use double quotes, but they are required if your attribute value includes spaces, hashtags, hyphens, or dots. Single quote compatibility is not yet completed.

Comments

A comment line begins with double slashes. The compiler has an argument you can pass on the command line to output comments to HTML when you compile as well.

Whitespace

Whitespace is trimmed and ignored unless within quotes. Indentation is recommended.

Contribution Guide

This software is still in development, so be warned of breaking changes.

Feel free to submit a pull request if you believe you have made a useful contribution.

License

The MIT License (MIT)

Copyright (c) 2015 Sam Weaver

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.