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

gromjs

v0.1.4

Published

Awesome co-powered build system

Readme

#GROM.js Awesome co-powered build system.

npm package

npm install -g gromjs

Why?

The goal of grom.js is to be a plugin-less build system that will allow to use any node module to process files without pain. Gives more control

Super simple

In gromfile.js:

var processor = require('files-processor')
var R = require('ramda')

module.exports.task = function* (){
  var filesSet = yield this.read(['path/to/files'])
  var mappedFilesSet = filesSet.map(function*(file){
    var newSource = processor(yield file.source())
    return file.clone(newSource, { ext: '.processed'})
  })

  return yield this.write('path/to/dist', mappedFilesSet)
}

In terminal:

$ gromjs task

That's it. No special grom-whatever plugins, use whatever you want.

API

  • yield this.read(glob) Returns ordered Set of Files

  • yield this.watch(glob) Returns events emitter, uses npm module watch and watch.createMonitor method

  • yield this.write(glob, Set) Accepts glob, Set of Files and writes everything in right place.

  • yield this.async(tasks) Accepts array of tasks and runs in asynchronously and independent to each other.

  • yield this.seq(tasks) Runs tasks one by one from left to right, every next one get result from previous.

Set

Is a set of Files uniq by glob, have next methods:

  • elements() Returns Set's elements

  • isContains(file) Checks if file is in Set by file's glob

  • add(file) Returns new Set with all elements plus new one

  • remove(element) Returns new Set without single element

  • union(set) Returns new Set that is union of elements from both sets

  • intersection(set) Returns new Set that is intersection between sets

  • difference(set) Returns new Set that is difference between sets

  • filter(interator*) Returns new Set with filtered elements

  • sort(interator*) Returns new Set with sorted elements

  • reduce(interator*, accumulator) Returns reduced value

  • map(interator*) Returns new Set with mapped elements

  • forEach(interator*) Iterates over elements and returns current Set

File

  • path() Returns full path

  • glob() Returns glob

  • name() Returns name with extension

  • source() Generator, returns file's source code

  • clone([glob], [source]) Creates new File, glob can be presented as hash with dir, name, ext fields which will be merged with parent file's path, path also can be just a string, if glob or source isn't provided, clone takes it from parent.

Examples:

run tasks in sequence:

var filesProcessor = require('files-processor')

var read = function* (){
  return yield this.read('/some/path/to/**.ext')
}

var processSet = function* (set){
  return set.map(function* (file){
    var source = yield file.source()
    return file.clone(yield extProcessor(source), { ext: 'js' })
  })
}

var write = function* (set){
  return yield this.write('/another/path', set)
}

module.exports.default = function* three(){
  yield this.seq([read, processSet, write])
}

watch files:


module.exports.default = function* three(){
  var monitor = yield this.watch('*.js')
  monitor.on('change', function* (Set){
    yield this.async(someTask)
  })
}

compile less:

var less = require('less')

module.exports.compileLess = function* compileLess (){
  var lessFilesSet = yield this.read('./code/**.less')

  var cssFilesSet = yield lessFilesSet.map(function* (file){
    var lessContents = (yield file.source()).toString()
    var css = (yield less.render(lessContents, {})).css
    return file.clone(css, { ext: 'css' })
  })

  return yield this.write('./dist', cssFilesSet)
}

CLI


$ gromjs <task-name>

TODO

  • Tasks logger
  • Tests
  • More examples

License

MIT © Dmitriy Kharchenko