A semantic dependency injection framework
This repository contains the source code of Components.js. Full documentation on its usage can be found at http://componentsjs.readthedocs.io/.
Instead of hard-wiring software components together, Components.js allows these components to be instantiated and wired together declaratively using semantic configuration files. The advantage of these semantic configuration files is that software components can be uniquely and globally identified using URIs.
Components.js can be installed using npm:
$ [sudo] npm install componentsjs
1. Define your module and its components
The npm module
my-module exports a component with the name
The constructor of
MyComponent takes a single
2. Create a configuration file containing a component instantiation
This configuration is a semantic representation of the instantiation of
name set to
3. Instantiate your component programmatically
...const Loader = Loader;const loader = ;await loader;const myComponent = await loader;...
myComponent is an instance of type
MyComponent, as defined in the config file.
Components.js is written by Ruben Taelman.