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

triple-m

v0.1.2

Published

A minimal markup language that transpiles to html

Downloads

10

Readme

Triple-M

Triple-M (Minimal Markup with Macros or MMM) is a markup language with the goal of simplifying the process of coding an html page by automating certain components like <meta> tags and fancy parameters and adding those in on the processing stage

Usage

To install the package:

npm install --save-dev triple-m

an example on how to compile your webpages would be

mmmc index.html

however, you can learn to use it more fluently by running mmmc -h or just mmmc

Syntax

Each line of code should follow more or less this structure

(spaces)[element] (properties) (;) : (Text)

  • (spaces) - The spaces (NOT INDENTS) tell the code how many layers into the code you are and how many times to close if you have tag after tag.
  • [element] - This is the element of what you are closing your code in. (<element>)
  • (properties) - These are the properties of the tag. you can put as many as you want as you were to apply in.
    • .[class] transforms into class="[class]"
    • #[id] transforms into id="[id]"
  • ; is an optional tag, that means that you wish to close the element on the same line.
    • This can also be place as any element before the colon sign and after the element but for intended practices, I suggest as the last component before the colon.
  • : is currently mandatory as it currently tells the compiler that is all the information for the element, however this will hopefully change in the future
  • (Text) - Whatever text you wish to put in between.

There are also exception commands, but these are documented in the wiki, or can be seen in the example below.

Example

Here is an example script:

title ; : Website Title
// This is a Comment

// You do not need quotation marks when referring to a file
SCRIPT js/script.js
// You can even hard embed scripts directly into the html page with EMBED
CSS css/style.css EMBED

// the line below indicates that you are splitting between the head and body tags
// If the line is there, then it will not create a full html file.
---

nav .navbar :
 a .navbar-brand : Example Page :D

div .container :
 h1 ; : Is there bootstrap installed in this page?
 b : nope! but it's kinda funny I guess lol

For more documentation, you can go to the wiki

Development

to setup the project on your desktop and develop, run these

git clone https://github.com/Henderythmix/triple-m
cd triple-m
npm install

npm run build # builds the javascript files to run the compiler
npm test # runs the compilation of the example folder