Skip to content

Instantly share code, notes, and snippets.

@jnordberg
Created February 27, 2012 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jnordberg/1926447 to your computer and use it in GitHub Desktop.
Save jnordberg/1926447 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