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

hive-queen

v0.0.1b

Published

a directory spawner for hive-mvc

Downloads

45

Readme

hive-queen

A directory spawner for hive-mvc websites.

hive-queen is nondestructive - that is it does not edit or overwrite any files or directories that have been created, and it does not delete directories if they are not included in the configuration file.

Hive has a fairly deep taxonomy:

FRAMES contain HIVES contain ACTIONS contain STATIC FOLDERS

and (the first three) can contain RESOURCE FOLDERS including MODELS,MIXINS,VIEW_HELPERS and RESORUCES.

Because as a rule each type of thing is contained in a "type folder" your folder heirarchy can get quite deep. Here are a few sample directory chains

frames/blog/hives/articles/actions/new frames/blog/hives/articles/actions/new/static/js

frames/blog/hives/articles/actions/add frames/blog/hives/articles/actions/add/static/js

frames/blog/hives/articles/actions/edit frames/blog/hives/articles/actions/view

frames/blog/hives/admin/actions/approve frames/blog/hives/admin/actions/new_chapter frames/blog/hives/admin/actions/new_chapter/static/js

And of course, these directories contain scripts, client side resource, config files et all.

hive-queen is an attempt to kickstart a site by establishing a standard scaffold that should work out of the box. For the action script JavaScript file, this is especially useful as the chain of files for multi method actions is a bit deep.

Creating a site with hive-queen

Once you have an understanding of how things nest, creatinga site with hive-queen is simple.

  var q = require('hive-queen');
  q.spawn({
  	frames: {
  		blog: {
  			hives: {
  				articles: {
  				 	actions: [
						'new',
						'add',
						'edit',
						'view' ]
  					},
  				admin: {
  					actions: [
  						'approve',
  						'new_chapter'
  						]
  					}
  			}
  		}
  	}
  }, function(){
  	console.log('done spqwning site');
  })

Note how this heirarchy follows the pattern

{type_name: {instance: {}, instance: {}, instance: {} } }

recursively.

Again, as mentioned above, you can run this command any number of times as you develop your site to spawn new branches.

Reducing Static boilerplate

By default queen will create a static directory for js, img, and css files for each action. This is overkill for a REST endpoint (and many other situations). To tell queen NOT to add static directories, or to customize how those static directories are created/described, be more specific in the action definition

  var q = require('hive-queen');
  q.spawn({
  	frames: {
  		blog: {
  			hives: {
  				articles: {
  					actions:[
  					{name: 'new', static: false},
  					{name: 'add', static: {'/js': '/js/art/add', '/forms': '*/forms', '/img': '/img/art/add'} },
  					'edit',
  					'view' ]
  					 },
  				admin:  {
  					actions: [
						'approve',
						'new_chapter'
						]
					}
  			}
  		}
  	}
  }, function(){
  	console.log('done spawning site');
  })

The name in the static hash is the actual subdir (within the static folder) in which your resources live. The value is the URL prefix for those static files.

Also, if you have static property set to false, no static directories are created.

NOTE: hive-queen may make a site scaffold, but you must have hive-mvc in your node_modules to actually run the site as well as an app.js file.