Skip to content

Upgrading from 0.2 to 0.3

Pete Bacon Darwin edited this page May 2, 2014 · 3 revisions

Processors

The init(config, injectables) method is deprecated. Instead you can:

  • Inject config directly into your process method and get the configuration values you need there.

    process: function(docs, config) { ... }
    
  • Provide "injectables" through the new exports property on processors:

    exports: { someService: ['factory', function(dependencies) {
      ...
      return someServiceInstance;
    }
    

    These exports can also have dependencies, such as config injected in them too.

Clone this wiki locally