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

jass-cli

v1.2.0

Published

a javascript preprocessor for css

Downloads

11

Readme

Jass - Just another Sloppy StyleScript

Jass - Just another Sloppy StyleScript

Jass is a FOSS CSS preprocessor written in JavaScript. It allows users to write CSS like JavaScript objects, and provides a number of features to make styling more convenient and efficient.

GitHub StarsGitHub Forks GitHub Issues GitHub License

Features:

  • Deep nesting of CSS rules
  • Object extension using "@extends" key
  • CSS shorthand as JavaScript objects
  • Parsing of images to base64
  • CLI tool for easy usage
  • Built-in support for CSS variables
  • Ability to define media queries in JavaScript
  • Inline code evaluation for dynamic styles

Usage:

To start using jass, you can run the following command:

jass start

To compile your jass code to CSS, you can use the following command:

jass build -i [input file path] -o [output file path]

Replace [input file path] and [output file path] with the appropriate file paths.

Example:

To illustrate the power of jass, consider the following example of a button:

const button = { color: "white", background: "blue", padding: "10px", borderRadius: "5px", "&:hover": { background: "darkblue" }, "@media (max-width: 600px)": { width: "100%" } };

This jass code defines a button with the specified styles, and also includes a hover effect and a media query for small screens. With jass, you can use JavaScript to easily define complex styles and responsive design.

GitHub

jass is an open-source project and is available on GitHub. You can find the source code, documentation, and issue tracker there. Feel free to submit pull requests or issues if you find any bugs or have any suggestions for new features.

You can also use the package manager of your choice to add jass to your project. Example:

npm install jass

or

yarn add jass

Once you have jass installed, you can import it into your project and start using it right away.

import jass from 'jass'; const button = { color: "white", background: "blue", padding: "10px", borderRadius: "5px", "&:hover": { background: "darkblue" }, "@media (max-width: 600px)": { width: "100%" } }; const css = jass.createCss(button);

This will take the JavaScript object and compile it into valid CSS, which you can then insert into your HTML file or use in a stylesheet.

jass also provides a plugin system which allows you to extend its functionality. You can find many useful plugins in the jass community or create your own.

In summary, jass is a powerful CSS preprocessor that allows you to write CSS in a more convenient and efficient way. With its deep nesting, object extension, shorthand, and parsing capabilities, jass makes styling your web projects a breeze. And being FOSS, it's available on GitHub for you to use, contribute, or even create your own plugins.