assemblerjs 0.3.2 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# assembler.js
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[](https://badge.fury.io/js/assemblerjs)
|
|
3
|
+
A general purpose and zero-dependency [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection) framework for node and browser.
|
|
6
4
|
|
|
7
|
-
   
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
---
|
|
10
8
|
|
|
11
9
|
`assembler.js` name is a tribute to Gilles Deleuze and Felix Guattari concept of [_Agencement_](<https://fr.wikipedia.org/wiki/Agencement_(philosophie)>) (in french) that can be translated into [Assemblage](<https://en.wikipedia.org/wiki/Assemblage_(philosophy)>).
|
|
12
10
|
|
|
@@ -26,7 +24,7 @@ npm install assemblerjs
|
|
|
26
24
|
|
|
27
25
|
Dependencies are registered and built recursively from the entry assemblage resolved by `Assembler.build`.
|
|
28
26
|
|
|
29
|
-
`onRegister`
|
|
27
|
+
##### `onRegister`
|
|
30
28
|
|
|
31
29
|
Static hook called when registering the assemblage.
|
|
32
30
|
Other dependencies may or may not have been registered at this point, and dependency tree is not built yet.
|
|
@@ -50,7 +48,6 @@ This will be called like the `onInit` method, walking through the dependency tre
|
|
|
50
48
|
### Events
|
|
51
49
|
|
|
52
50
|
`assembler.js` provides an `EventManager` that can be subclassed by any assemblage.
|
|
53
|
-
An `AbstractEventAssemblage` abstraction helper class can also be imported to keep assemblages typesafe.
|
|
54
51
|
|
|
55
52
|
Because all events **are forwarded by `AssemblerContext`** the `EventManager` is quite strict on which events can be broadcasted and they must be registered explicitly using the `events` property of the `AssemblageDefinition`. To avoid collision between events channels, user is strongly encouraged to create _strong_ channels names, e.g.: `com.domain.app.assemblage-name:init`.
|
|
56
53
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assemblerjs",
|
|
3
|
-
"description": "A
|
|
4
|
-
"version": "0.3.
|
|
3
|
+
"description": "A general purpose and zero-dependency Dependency Injection framework for node and browser.",
|
|
4
|
+
"version": "0.3.21",
|
|
5
5
|
"author": "Benoît LAHOZ <info@benoitlahoz.io>",
|
|
6
6
|
"bugs": "https://github.com/benoitlahoz/assemblerjs/issues",
|
|
7
7
|
"devDependencies": {
|