The JavaScript blog.


libraries node modules markdown epub npm cms

Node Roundup: npm Scopes, AkashaEPUB, mdjson

Posted on .

npm Scopes

Since npm got private modules, it has supported scopes, because private modules are resolved based on your username. However, one thing that I didn't realise was scopes are available to everyone -- you don't have to use them for private modules. That means you can reuse an existing package name, which makes sense if the package name is generic enough.

This was mentioned in this week's npm weekly post, under "solving npm’s hard problem: naming packages":

As part of the private modules rollout last week, we introduced a new free feature: scopes for packages. If you’re a registered npm user then you already have a scope, so check out the post if you want to learn how to use it.

This will be handy if you want to distribute your own fork for existing modules through npm.


David Herron sent in AkashaEPUB (GitHub: akashacms/akashacms-epub, License: Apache 2.0, npm: akashacms-epub), a toolchain for constructing EPUB version 3 books. It allows you to write books using Markdown, and helps manage the asset files (CSS, images, fonts), and builds a correct EPUB3 file.

AkashaEPUB is built using AkashaCMS, which is a static site generator:

The goal for AkashaCMS is to provide most of the flexibility of a full scale CMS, incorporate modern JavaScript/CSS UI frameworks, while producing static HTML files, and skipping the administrative overhead of running a full CMS.

To use AkashaEPUB, you'll need Grunt and an EPUB to generate. There's a sample project and a skeleton. The following example will build the EPUB Guidebook that David Herron created:

npm install -g akashacms  
npm install -g grunt-cli  
git clone https://github.com/akashacms/epub-guide.git  
cd epub-guide  
npm install  
grunt doepub  


mdjson (GitHub: yoshuawuyts/mdjson, License: MIT, npm: mdjson) by Yoshua Wuyts is a module for generating JSON from Markdown. The properties in the JSON are based on the headings, which means you can use it to write JavaScript objects in a more friendly manner. This works particularly well with template strings:

  This part (before any headers) is ignored. Feel free
  to use this section for commentary on the file's purpose,
  if you wish.

  ## my heading
  oh wow, amazing

  ## another heading
  gorgeous copy, stunning

The output contains the original input and HTML:

  'my heading': {
    raw: 'oh wow, amazing',
    html: '<p>oh wow, amazing</p>'

  'another heading': {
    raw: 'gorgeous copy, stunning',
    html: '<p>gorgeous copy, stunning</p>'

I think this might be a cool way of converting Markdown to something more structured to store in a database for a CMS or static site generator.


google events node markdown robots

RobotsConf, DownDoc, opensemanticapi

Posted on .



RobotsConf will take place on December 6th in Florida, and is a hardware-focused event aimed at developers who use high-level languages like JavaScript. Organised by Chris Williams (aka @voodootikigod), RobotsConf is a practical event to get you started in the Maker Movement:

If you are a Ruby, Python, JS or any other high level language developer that is interested in the Maker Movement, but unsure where to start -- this event is designed for you. We will have experts in each high level language in attendance and available as well as many of the incredible makers who are already changing the world. With hands-on sessions covering drones, 3D Printing, microcontrollers, and the Internet of Things, this is the only two day event that will take you from a software developer to a Maker.

It's organised by the JSConf team, so you know you'll be in safe hands! Tickets start at $550 for early birds, and then $750 for a regular ticket.


If you followed my Backbone.js Google Tasks tutorials then you'll know all about the wonders of gapi. DownDoc (GitHub: marksteve / downdoc, License: MIT) by Mark Steve Samson uses another Google API to store Markdown documents in Google Drive. If you're tired of working with Word-like documents, then why not give it a try? It's entirely browser-based, and the original source is pretty much a single CoffeeScript file.


opensemanticapi (GitHub: monbro / opensemanticapi, License: MIT) by Michael Klein is a "semantic wording database" made with Node and Redis. After leaving it running for a few hours it will have downloaded enough data to produce interesting results. Michael has some examples in the project's readme, for example:

// http://localhost:8080/relations/ship

["midshipmen", "aboard", "ships", "rating", "master", "served", "seaman", "sea", "officers", "santa", "sailing", "cadets", "able", "sail", "navigation", "lieutenant", "hms", "expected", "yahoo", "storm", "rated", "promotion", "maría", "lewis", "false", "era", "boys", "wind", "voyage", "volunteer", "servants", "required", "passing", "palos"]

One thing that interests me about this is as a brainstorming tool for authors, as an alternative to a thesaurus.


jquery plugins apps social images markdown

jQuery Roundup: SocialCount, Literally Canvas, Socrates

Posted on .

Note: You can send your plugins and articles in for review through our contact form or @dailyjs.


Social buttons can slow down page loading times due to a variety of reasons. One solution is to lazy load them, and this is exactly what the SocialCount (GitHub: filamentgroup / SocialCount, License: MIT) from Filament Group does. It can show "like" style buttons, counts, and lazy load the social network's original buttons.

It's designed using progressive enhancement techniques, and is tested against IE 7+, as well as the other major browsers, and various touchscreen devices. It also includes QUnit tests.

Literally Canvas

Drawing with a trackpad is tricky business.

Literally Canvas (GitHub: literallycanvas / literallycanvas, License: BSD) by Stephen Johnson and Cameron Paul is a drawing widget built with jQuery and Underscore.js. It has some basic drawing tools and can upload images to imgur.

The plugin accepts an options object that can be used to enable or disable certain features:

  backgroundColor: 'rgb(255, 0, 0)', // default rgb(230, 230, 230)
  keyboardShortcuts: false,          // default true
  sizeToContainer: false,            // default true
  toolClasses: [LC.Pencil]           // see coffee/tools.coffee


Real-time Markdown editing with Socrates.

Socrates (GitHub: segmentio / socrates, License: MIT) by Ilya Volodarsky and Ian Storm Taylor is a Markdown editor and previewer. It's built with jQuery, Backbone.js, and a client-side Markdown parser by Christopher Jeffrey.

The data is stored in Firebase, so you'll need an account with Firebase to install your own instance of Socrates.


databases node modules mongo documentation async markdown

Node Roundup: MongloDB, parseq.js, node-netpbm

Posted on .

You can send in your Node projects for review through our contact form or @dailyjs.


MongloDB Logo

MongloDB (GitHub: onglo / MongloDB, License: MIT) by Christian Sullivan is a database written with JavaScript that's compatible with MongoDB's queries. It has a plugin system for persistence, and a datastore for Titanium Mobile -- this effectively allows a form of MongoDB to be used within iOS and Android applications.

Monglo has a DataStore API that can be used to persist data locally or remotely. It's based around an object that implements each CRUD operation:

var monglo = require('./index').Monglo  
  , db = monglo('DemoDB')

function DemoStore(){  
  return {
     insert: function() {}
   , update: function() {}
   , open: function() {}
   , remove: function() {}
   , all: function() {}

db.use('store', new DemoStore());  


parseq.js (GitHub: sutoiku / parseq, License: MIT, npm: parseq) from Sutoiku, Inc. is a flow control library for organising parallel and sequential operations. To manage asynchronous operations, this can be passed. If several calls are made, then this() can be passed, and the next function will receive an array that contains the results in the order they were called.

The same author also recently released jsdox, which is another JSDoc to Markdown generator.


netpbm (GitHub: punkave / node-netpbm, License: MIT, npm: netpbm) by Tom Boutell scales and converts images using the netpbm toolkit, which is a venerable set of graphics programs found on many Unix systems.

This library is a wrapper around the netpbm binaries, and takes advantage of the fact that most netpbm programs only read one row of pixels at a time into memory to keep memory usage low.


node modules documentation authentication debugging markdown

Node Roundup: Markdox, node-authenticate, node-codein

Posted on .

You can send in your Node projects for review through our contact form or @dailyjs.


Markdox (License: MIT, npm: markdox) by Charles Bourasseau is a documentation generator based on Dox (which TJ changed to output JSON only) that produces Markdown. It can be used in the shell, or programatically.

This is a straightforward way of generating API documentation that works with services that support Markdown, like GitHub.


authenticate-pam (License: MIT, npm: authenticate-pam) by Damian Kaczmarek is an asynchronous PAM authentication addon. It uses libpam to authenticate users with a simple, idiomatic Node API:

var pam = require('authenticate-pam');  
pam.authenticate('myusername', 'mysecretpassword', function(err) {  
  if (err) {
  } else {


node-codein (License: MIT, npm: node-codein) by "ketamynx" is a Windows-friendly Node interface based on WebKit Inspector. It can display objects graphically as trees, and can also execute code.

Although it looks like a debugger interface, it seems like the author intends for it to be used as a friendly alternative to the REPL.