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

cliste

v0.1.8

Published

Cliste, a NodeJS CMS

Downloads

13

Readme

Cliste CMS

  • Brian Martin
  • https://twitter.com/bmarti44
  • Public Domain
  • 2012-11-3

What is it?

This is currently a work in progress, any developers that want to help let me know!

Cliste CMS utilizes Node.js and Handlebars.js to create a 100% JavaScript based CMS. This is currently a work in progress and does not yet support all functionalities you would expect in a CMS. User Management, Permissions, Database API and Forms are still outstanding components. Implemented components include the Server, Virtual Paths, Theming, File Management and Aliases. This CMS has been inspired by Drupal and follows many of the file/folder structures. That said, this is not a Drupal clone by any means, although there are many similiarities.

Setup

Download/clone this project to your system. Use npm to install:

npm install require-dir handlebars mongodb mongoose node-static -g

Update settings.js to include the correct path to Cliste

Then go into the project, and run "node index.js"

If you get a module not found error, don't forget to link it, like so:

npm link require-dir

Where require-dir is the name of the module

Also, don't forget to make sure mongodb is running

Module Creation

  1. To create a new module, create a new folder at /sites/all/module/{{module-name}}
  2. Create a file called index.js inside the folder you just created
  3. If needed, create a folder called template, and add any handlebars templates you might need

An example of the home module:

	/**
	 *	@description
	 *		This module will control the home page
	 *	@author
	 *		Brian Martin
	 *	@version
	 *		1.0.0
	 *	@namespace
	 *		Home
	 */
	(function() {
		'use strict';
		
		var home = {};
		
		/**
		 * Implementation of hook.initialize()
		 * This will be called once when the server starts
		 */
		home.initialize = function () {
			
		};
		
		/**
		 * Theme callback
		 * @return {String}
		 *		Return the HTML for the home page
		 */
		home.getHTML = function() {
			return global.cliste.core.theme.process('home');
		};
		
		/**
		 * Implementation of hook.addTheme
		 * Add a new theme definition to the theme registry
		 */
		home.addTheme = function (callback) {
			// add a new theme for the home page
			callback({
				'home': { // name it home
					'parent': 'page', // make it's parent page.handlebars
					'view': global.cliste.core.file.getSource('module', 'home', 'template/home.handlebars'), // set the view as the source of home.handlebars
					'model': { // pass the model
						'text': 'frontpage'
					}
				}
			});
			
		};
		
		/**
		 * Implementation of hook.config()
		 * This will return configuration options for this module
		 */
		home.config = function () {
			return {
				'weight': 0
			};
		};
		
		/**
		 * Implementation of hook.addPath
		 * Add a new path to the path registry
		 */
		home.addPath = function (callback) {
			
			callback({
				'/home': {
					'type': 'module',
					'name': 'home',
					'callback': 'getHTML'
				}
			});
			
		};
		
		/**
		 * Implementation of hook.addAlias
		 * Add a new alias to the alias registry
		 */
		home.addAlias = function (callback) {
			
			// add a new alias, and point it at the home page
			callback({
				'/': '/home'
			});
			
		};
		
		/**
		 * Set listeners for emitter hooks
		 */
		global.cliste.tools.emitter.on('initialize', home.initialize);
		global.cliste.tools.emitter.on('addTheme', home.addTheme);
		global.cliste.tools.emitter.on('addPath', home.addPath);
		global.cliste.tools.emitter.on('addAlias', home.addAlias);
		
		/**
		 * Return the user module to the global scope
		 */
		module.exports = home;
		
	}());

Compatibility

  1. Requires Node.js
  2. Requires Handlebars.js
  3. Requires MongoDB
  4. Requires Mongoose