nl_tokens: Implements the %extension command that can be used to install a specific named module as a shell extension using npm .
pl_tokens: function extensionCommand ( shell , args , data , evaluationId ) { var deferred = shell . runtime . q . defer ( ) ; var name = args . name ; var moduleName = 'ijs.ext.' + name ; var modulePath = args . path || moduleName ; installer . install ( modulePath , shell . config . userPath , /* quiet */ true , function ( error ) { if ( error ) { deferred . reject ( shell . createError ( 'Unable to install extension module "%s"' , moduleName ) ) ; } else { var extensionPath = path . join ( shell . config . userPath , 'node_modules' , moduleName ) ; var extension = require ( extensionPath ) ; try { extension . initialize ( shell , function ( error , result ) { if ( error ) { deferred . reject ( shell . createError ( 'Error initializing extension' ) ) ; } else { shell . loadedExtensions [ <mask> ] = true ; deferred . resolve ( result ) ; } } ) ; } catch ( e ) { deferred . reject ( shell . createError ( 'Error initializing extension' ) ) ; } } } ) return deferred . promise ; }