Skip to content
knownasilya edited this page Dec 9, 2014 · 1 revision

Require()'ing Strider

Strider can be require()-ed like any other NPM module. This is particularly useful when you want to

  • Make Strider a dependency at a specific version
  • Choose exactly which plugins to install
  • Customize configuration
  • Do other crazy stuff

For example, you could have a project with its own package.json that depends on strider at a specific version, along with any other extensions you choose loaded from a particular filesystem location. Then you could write a simple initialization shim like the following:

var strider = require('strider');

var instance = strider('/path/to/extensions/dir', config, function(err, initialized, appInstance) {
  console.log('Strider is now running');
});
Clone this wiki locally