Skip to content

Instantly share code, notes, and snippets.

@cowboy
Forked from jnordberg/gist:1926447
Created February 27, 2012 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cowboy/1926484 to your computer and use it in GitHub Desktop.
Save cowboy/1926484 to your computer and use it in GitHub Desktop.
npm plugin system
npm = require 'npm'
npm.load {global: true}, (error, npm) ->
npm.commands.ls [], true, (error, result) ->
for moduleName, module of result.dependencies
if moduleName[..8] == 'clitool-'
# load module as a plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment