lib/index.js
function (dirs, done) {
    var self = this;
    utils.findExtensions(dirs, function (err, extensions) {
      if (err) return done(err);

      for (var i = 0; i < extensions.length; i++) {
        extensions[i].type = extensions[i].type || 'basic';
        extensions[i].id = extensions[i].id.toLowerCase();
        if (RESERVED.indexOf(extensions[i].id) !== -1) {
          return done(new Error('Extension id "' + extensions[i].id + '" is reserved. Your plugins are misconfigured.'));
        }
        if (self.ids[extensions[i].id]) {
          // XXX should we die hard, ignore, or warn?
          return done(new Error('Duplicate extension id! Your plugins are misconfigured.'));
        }
        self.ids[extensions[i].id] = true;
        self.extensions[extensions[i].type][extensions[i].id] = extensions[i];
      }
      done();
    });
  }
function (dirs, done) {
    var self = this;
    utils.findExtensions(dirs, function (err, extensions) {
      if (err) return done(err);

      for (var i = 0; i < extensions.length; i++) {
        extensions[i].type = extensions[i].type || 'basic';
        extensions[i].id = extensions[i].id.toLowerCase();
        if (RESERVED.indexOf(extensions[i].id) !== -1) {
          return done(new Error('Extension id "' + extensions[i].id + '" is reserved. Your plugins are misconfigured.'));
        }
        if (self.ids[extensions[i].id]) {
          // XXX should we die hard, ignore, or warn?
          return done(new Error('Duplicate extension id! Your plugins are misconfigured.'));
        }
        self.ids[extensions[i].id] = true;
        self.extensions[extensions[i].type][extensions[i].id] = extensions[i];
      }
      done();
    });
  }
function ( dirs , done ) { var self = this ; utils . findExtensions ( dirs , function ( err , extensions ) { if ( err ) return done ( err ) ; for ( var i = 0 ; i < extensions . length ; i ++ ) { extensions [ i ] . type = extensions [ i ] . type || 'basic' ; extensions [ i ] . id = extensions [ i ] . id . toLowerCase ( ) ; if ( RESERVED . indexOf ( extensions [ i ] . id ) !== - 1 ) { return done ( new Error ( 'Extension id "' + extensions [ i ] . id + '" is reserved. Your plugins are misconfigured.' ) ) ; } if ( self . ids [ extensions [ i ] . id ] ) { // XXX should we die hard, ignore, or warn? return done ( new Error ( 'Duplicate extension id! Your plugins are misconfigured.' ) ) ; } self . ids [ extensions [ i ] . id ] = true ; self . extensions [ extensions [ i ] . type ] [ extensions [ i ] . id ] = extensions [ i ] ; } done ( ) ; } ) ; }
find all extensions in dirs and organize them by type load from `strider.json` or package.json's `strider` section
find all extensions in dirs and organize them by type load from strider . json or package . json s strider section