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 🙏

© 2025 – Pkg Stats / Ryan Hefner

gulp-atomicscss

v0.4.0

Published

A plugin for Gulp that takes text, scans for class attributes and generates an scss file from the classes

Readme

gulp-atomicscss

atomicscss plugin for gulp

Usage

First, install gulp-atomicscss as a development dependency:

npm install --save-dev gulp-atomiccsss

Class Attribute

Write class names as emmet css abbreviations.

  • <emmet>
  • class="dib" => .dib { display: inline-block; }

Use colors

  • <emmet>-c<hex>
  • class="c-cf00" => .c-cf00 { color: #f00; }

Use SCSS variables

  • <emmet>-v<var name>
  • class="c-vColor1" => .c-vColor1 { color: $Color1; }

Multi-part settings

  • <emmet>-<val>-<val>-<val>
  • class="m-10px-5px-0px-5px" => .m-10px-5px-0px-5px { margin: 10px 5px 0px 5px; }

Using a dot ‘.’

  • <emmet>-p<num>
  • <emmet>-<num>p<num>
  • class="fz-p5em" => .fz-p5em { font-size: .5em; }
  • class="fz-2p5em" => .fz-2p5em { font-size: 2.5em; }

Percentages

  • <emmet>-x<num>
  • class="w-x50" => .w-x50 { width: 50%; }
  • class="w-x12p5" => .w-x12p5 { width: 12.5%; }

Pseudo classes

  • <emmet>-pse-<pseudo>
  • class="c-pse-hover-cf00" => .c-pse-hover-cf00:hover { color: #f00; }

Molecules - groups atomic classes together for re-use

  • _<className> <emmet> <emmet> <emmet>
  • class="_link1 c-cf00 dib lh-25px" =>
._link1 { 
  color: #f00; 
  display: inline-block; 
  line-height: 25px; }
  • class="_color c-cf00 _link dib lh-25px" =>
._color { 
  color: #f00; } 
._link1 { 
  display: inline-block; 
  line-height: 25px; }

Escaping SCSS generation

  • -<Classname>
  • -ignoreThis =>

Getting Started with a Sample Project

Create a folder called files, and create a file in it called index.html

<!doctype html>
<html>
<head>
    <link rel="stylesheet" href="../css/style.css">
</head>
<body>
    <div class="dib">Hello World</div>
</body>
</html>

Create a Folder called scss and create a file in it called style.scss:

@import "atomic";

Create the following file gulpfile.js:

var gulp = require('gulp'),
    atomic = require('gulp-atomicscss'),
    concat = require('gulp-concat'),
    sass = require ('gulp-sass');

gulp.task('atomic', function() {
    return gulp.src('files/*.html')
        .pipe(concat('_atomic.scss'))
        .pipe(atomic())
	.pipe(gulp.dest('scss/'));
});

gulp.task('sass', ['atomic'], function () {	
    gulp.src('scss/*.scss')
        .pipe(sass())
        .pipe(gulp.dest('css/'));
});

gulp.task('default', ['sass']);

gulp.task('watch', function() {
    gulp.watch(['files/*.html', 'scss/*.scss'], function(event) {
        gulp.start('default');
    });
});

For this gulpfile to work you will need to use the following commands:

npm install gulp
npm install gulp-atomicscss
npm install gulp-concat
npm install gulp-sass

You should now have the following directory structure:

files/
 |- index.html
scss
 |- style.scss
node-modules
 |- < . . . >
gulpfile.js

now run the command gulp, and the following files will be created:

css/
 |- style.css
scss/_atomic.scss

The file _atomic.scss should contain the following:

.dib { display: inline-block; }

The file style.css should contain the following:

.dib {
    display: inline-block; }

License

MIT License