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

myntra-k

v1.0.0

Published

build systems, revisited

Downloads

2

Readme

k

I wanted to write 'build' files like so -

k().chain()
.filter(/.js$/)
.read()
.compress()
.hashify()
.concat()
.write()
.log('done!');

So I'm writing it. It's coming along well.

blurb

Build systems, at their core, are:

  • simple task systems
  • most of which deal with files as inputs

We can take these two ideas and make a simple dsl in javascript using deferreds. With A simplified convention, and a set of basic tasks, we can do common 'build-system'-y stuff double quick!

You do this by defining behaviors, or tasks, with functions that accept callbacks. k takes care of the rest, wiring it up to your 'file sets', and executing it in order. You can change the nature of the files by changing the value of this.files during your tasks.

Btw, a 'file' is a simple hash. Looks sorta like this -

{
    src: 'lib/jquery.js',
	content: '...'
	dest: 'dist/lib/jquery.min.js'
}

So when you're making a task, you'd want to to mess with this.files, and change the .content, or .dest, or even add new files to be written on the next pass of .write()

NB: file.content stays blank until you run k().read()

see tasks.js for available tasks. edit script.js for doodling

var o = k({
	src: './',		// src folder, use .filter() to narrow it down from here. defaults to ./
	dest: 'build'	// destination folder. defaults to ./dist
					// send whatever else you'd like, they'll be available on this.config
});
k.task(name, fn)	// define a new task. the task will be available on all further k() instances.

tests

Build Status

npm test

coverage report

npm run-script coverage

Thanks to http://yuilibrary.com/gallery/show/deferred for the deferred pattern.

coming up

  • analysis tasks
  • full fledged examples
  • command-line fu
  • terminal dashboardy stuff?