@chix/loader
Definition Loader for Chiχ
Last updated 2 years ago by rhalff .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @chix/loader 
SYNC missed versions from official npm registry.

Chiχ Loader

Build Status

This is the base component loader for Chiχ.

Chiχ uses node definitions to describe each of it's components.

The loader takes care of loading these definitions and caching them.

On top of the base loaders there are loaders which load the definitions from a remote server or from the file system.

The base loader accepts definitions added manually.

Definitions are indexed by provider url, but the manual loader uses '@' to indicate the definitions are local.

Example usage:


var Loader = require('chix-loader');

var loader = new Loader();

loader.addNodeDefinitions('@', [{
  ns: 'my', name: 'component',
  ports: {
    input: {
      'in': {
          type: 'string'
      }
    },
    output: {
      out: {
          type: 'string'
        }
      }
    }
  }, {
    ns: 'my', name: 'component2',
    ports: { input: { in: { type: 'string' } } }
}]);

// retrieve a node definitions from a provider
loader.getNodeDefinitionFrom('@', 'my', 'component');

// Checks whether the definition is available
loader.hasNodeDefinition('@', 'my', 'component'); // true

// Given a node and it's map, will try and load the (remote) node.
// TODO: Explain provider structure within a map
loader.getNodeDefinition({
 ns: 'my',
 name: 'component'
}, map);

collecting dependencies

It's also the loaders job to collect the dependencies needed to run a graph. This is rather simple if a graph only contains non-composite nodes, but quickly becomes more complex when subgraphs are used and the number of subgraphs are unknown. The loader keeps track of which requires are needed.

Current Tags

  • 2.9.14                                ...           latest (7 months ago)

35 Versions

  • 2.9.14                                ...           7 months ago
  • 2.9.13                                ...           7 months ago
  • 2.9.8                                ...           7 months ago
  • 2.9.7                                ...           7 months ago
  • 2.9.3                                ...           a year ago
  • 2.9.2                                ...           a year ago
  • 2.9.0                                ...           a year ago
  • 2.8.0                                ...           a year ago
  • 2.7.8                                ...           2 years ago
  • 2.7.6                                ...           2 years ago
  • 2.7.5                                ...           2 years ago
  • 2.7.4                                ...           2 years ago
  • 2.7.3                                ...           2 years ago
  • 2.7.1                                ...           2 years ago
  • 2.7.0                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
  • 2.2.1                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.1                                ...           2 years ago
  • 1.16.3                                ...           2 years ago
  • 1.16.1                                ...           2 years ago
  • 1.16.0                                ...           2 years ago
  • 1.15.4                                ...           2 years ago
  • 1.15.3                                ...           2 years ago
  • 1.15.2                                ...           2 years ago
  • 1.15.1                                ...           2 years ago
  • 1.15.0                                ...           2 years ago
  • 1.4.3                                ...           2 years ago
  • 1.4.2                                ...           2 years ago
  • 1.4.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 36
Dependencies (3)
Dev Dependencies (19)

Copyright 2014 - 2016 © taobao.org |