You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
4
4
> Parses a DOM Node for tags and executes the matching constructor on each element. This module embraces the practice of a 'Single Point of Entry'-Application(SPE).
5
5
6
+
6
7
## Why?
7
8
Using a single point of entry reduces code and promotes maintainability. Instead of writing the following accross all of your sites/apps components:
TL;DR: Use an assembler, to reduce duplicate code, enhance performance and reduce the dependence of selectors in your JS.
18
19
20
+
19
21
## Install
20
22
With npm, use the familiar syntax e.g.:
21
23
```shell
@@ -27,7 +29,7 @@ once the Assembler package is installed, just require it in the main application
27
29
var assembler =require('@reduct/assembler');
28
30
```
29
31
30
-
This package also supports AMD/RequireJS, it is defined as `reduct.assembler`. Aren't using AMD/CommonJS? Just grab a [release](https://github.com/reduct/assembler/releases), include the `Dist/Assembler.min.js` and access the loader via the following global:
32
+
This package also supports AMD/RequireJS. Aren't using AMD or CommonJS? Just grab a [release](https://github.com/reduct/assembler/releases), include the `Dist/Assembler.min.js` and access the assembler via the following global:
31
33
```js
32
34
var assembler =window.reduct.assembler;
33
35
```
@@ -55,6 +57,7 @@ In your HTML:
55
57
<divdata-component="YetAnotherComponent"></div>
56
58
```
57
59
60
+
58
61
## API
59
62
60
63
### Factory
@@ -116,9 +119,11 @@ import AnotherComponent from 'another-component';
116
119
app.registerAll({MyComponent, AnotherComponent});
117
120
```
118
121
122
+
119
123
## Contributing
120
124
In lieu of a formal styleguide, take care to maintain the existing coding style.
121
125
126
+
122
127
## License
123
128
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
124
129
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0 commit comments