Installation
Version 2.x
dcl
can be installed with most popular package managers:
1
|
|
1
|
|
When the package is installed, you can refer to individual files mentioned in the documentation.
dcl
uses UMD, so it can be used by node
as is. AMD loaders (used in browsers) are supported out of box too. If you prefer to use globals in your project, just source dcl
from /dist/
directory:
1
|
|
For ES6-based projects, especially ones using Babel (e.g, React, or anything webpack-based), starting with 2.0.3 the special distribution is generated in /es6/
directory, which can be used like that:
1 2 |
|
Alternatively, you can use https://unpkg.com/ with AMD:
1
|
|
or globals:
1
|
|
You can always find the latest code in github.com/uhop/dcl, and copy necessary files manually, or clone the whole project, if you wish.
Globals
Here is the full list of global names used by a version in /dist/
directory:
File name | Comment | Main global |
---|---|---|
dcl.js |
main OOP + AOP + chains | dcl |
advise.js |
object-level AOP | advise |
debug.js |
debugging | dcl |
advices/counter.js |
advice | dcl.advices.counter |
advices/flow.js |
advice | dcl.advices.flow |
advices/memoize.js |
advice | dcl.advices.memoize |
advices/time.js |
advice | dcl.advices.time |
advices/trace.js |
advice | dcl.advices.trace |
bases/Mixer.js |
base “class” | dcl.bases.Mixer |
bases/Replacer.js |
base “class” | dcl.bases.Replacer |
mixins/Cleanup.js |
mixin | dcl.mixins.Cleanup |
mixins/Destroyable.js |
mixin | dcl.mixins.Destroyable |
utils/registry.js |
utility | dcl.utils.registry |