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

seldon

v0.4.4

Published

CSS documentation generator inspired by Hologram

Downloads

4

Readme

seldon

Nodejs CSS documentation generator inspired by hologram.

This is a work in progress. This project currently works as a simple node script, but don't expect unicorns and rainbows (yet).

1. Use structured comments in your CSS

2. Create a Seldon config file

config.json

{
	"source": "../sq2/sass/",
	"destination": "build/index.html",
	"assets": [
		"templates/static/"
	],
	"templates": {
		"layout": "templates/layout.hbs",
		"example": "templates/example.hbs"
	}
}

Property | Description ---------------------- | -------------------------------- source | any dir containing files with structured comments destination | target dir for built docs (will be created if it doesn't exist) assets | static assets you'd like to copy into the destination dir (files will be copied to the root of destination) templates["layout"] | main handlebars template templates["example"] | template used to render html_example blocks

Running Seldon

$ npm install seldon --save-dev
Use as a node module
const Seldon = require('seldon');

Seldon.compile('./config.json');
Use from the command line
$ node seldon.js /path/to/config/config.json

3. Seldon creates a view for handlebars

{
	myCategory: {
		title: "My Category",
		name: myCategory,
		blocks: [ //components filed under this category
			{
				title: "My Component Title",
				name: "myUniqueComponentName",
				description: "(html string compiled from markdown, including html_example blocks)"
			},
			{
				title: "My Other Component in this category",
				name: "myOtherComponent",
				description: "(html string compiled from markdown, including html_example blocks)",
				children: [ /* nesting is supported with the `parent` convention from hologram docs */
					{
						title: "My child component",
						name: "childComponent",
						description: "(html string compiled from markdown, including html_example blocks)",
					}
				]
			}
		]
	}
}

4. Go forth and template

You can write your own handlebars template to use with the data provided by seldon.


Seldon?

This project is named after Hari Seldon, a fictional character in Isaac Asimov's Foundation.

In the series, Seldon is a pivotal figure who appears only in hologram form.

Special thanks to the good folks at Trulia who wrote hologram, the tool that inspired this project.