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

jasss

v0.0.4-c

Published

Just another style sheet syntax (jasss) language created to have fun.

Readme

Just Another Style Sheet Syntax (jasss)

Just Another Style Sheet Syntax (jasss) language created to have fun.

About

Jasss was created as a fun little experiment as I attempted to implement the basic features of other style sheet syntax (i.e. variables, file import). On top of that, I tried implementing the notion of abstract classes and inheritance.

TOC

Installation

    npm install jasss -g

Basic Usage

Command line

Through the command line:

    jass -i <input> -o <output>

    Where:
      <input>:      Required | Path to jasss file
      <output>:     Optional | Path to output the compiled CSS file (defaults to: {<input>}.css)
  • Input file:

    • required: The input file is required.
    • type: The input file must be a *.jasss file.
  • Output file:

    • The -o argument is optional. If not set, a CSS file with the same name as the input file will be created in the same directory.

Manual

To do it manually:

    let jasss = require("jasss");

    jasss.compileFile("./app.jasss", "./output.css");

Features

File import

Other jasss files can be imported by using the import function. Paths are relative to the projects root folder.

Example

  • Input: ./Example.jasss
    import("./path/to/file");

Variables

Variables can be declared by using a name (without white spaces) followed by an equal sign and ending with a semicollon.

Example

  • Input: ./Example.jasss
    bg-color = red;

Scopes

Jasss implements scopes, using a global scope and private scopes for elements. Private scopes are inherited by nested elements, along with their variables.

Example

  • Input: ./Example.jasss
    bg-color = red;

    .el1 {
        background-color: bg-color;
    }

    .el2 {
        bg-color = blue;
        background-color: bg-color;
    }

    .el3 {
        bg-color = yellow;
        .el3-child {
            background-color: bg-color;
        }
    }
  • Output:
    .el1 {
        background-color: red;
    }

    .el2 {
        background-color: blue;
    }

    .el3 {
    }

    .el3-child {
        background-color: yellow;
    }

Nested Classes

Nested classes can inherit the parent selector by using & character.

Example

  • Input: ./Example.jasss
    .parent {
        color: blue;
        &-child {
            color: white;
        }
    }
  • Output:
    .parent {
        color: blue;
    }

    .parent-child {
        color: white;
    }

Abstract Classes

Abstract classes serve as basic structure for other classes to implement. Everything contained in these classes will be inherited by the class which implents (including nested elements). This helps make the code more maintainable and to avoid repetition. These classes will not be included in the final output.

Usage

  • To declare a new abstract class create an element with a unique name followed by abstract keyword.
  • The class which will implement the abstract class should be declared with the selector followed by implements followed by the abstract class name.

Example

  • Input: ./button.jasss
    button abstract {
        & {
            cursor: pointer;
            color: font-color;
            padding: 1rem 3rem;
            display: inline-block;
            background-color: bg-color;
        }

        &:hover {
            background-color: bg-color-hover;
        }
    }

    .btn implements button {
        bg-color = #cccccc;
        font-color = #000000;
        bg-color-hover = #dddddd;
    }

    .btn-danger implements button {
        bg-color = #b71c1c;
        font-color = #ffffff;
        bg-color-hover = #ff1744;
    }
  • Output:
    .btn {
        cursor: pointer;
        color: #000000;
        padding: 1rem 3rem;
        display: inline-block;
        background-color: #cccccc;
    }

    .btn:hover {
        background-color: #dddddd;
    }

    .btn-danger {
        cursor: pointer;
        color: #ffffff;
        padding: 1rem 3rem;
        display: inline-block;
        background-color: #b71c1c;
    }

    .btn-danger:hover {
        background-color: #ff1744;
    }

Extending Classes

Class can extend other classes. By doing so, they inherit the class' properties and variables, but not their nested elements.

Usage

  • The class which will extend another class should be declared with the selector followed by extends followed by the abstract class name.

Example

  • Input: ./Text.jasss
    .bold {
        font-weight: bold;
    }

    .title extends .bold {
        font-size: 1.5em;
        padding-bottom: 0.3em;
        border-bottom: 1px solid #eaecef;
    }
  • Output:
    .bold {
        font-weight: bold;
    }

    .title {
        font-size: 1.5em;
        padding-bottom: 0.3em;
        border-bottom: 1px solid #eaecef;
        font-weight: bold;
    }

Author