-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the function exec to run a function injecting dependencies
- Loading branch information
1 parent
bf3d102
commit 3d3d46d
Showing
5 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ available functions | |
`importModule ( $module ) : this function will execute the function call and then add to the context` | ||
|
||
`loadDir ( dir ) : loads an entire directory recursively, searching for .js files to import` | ||
|
||
`exec ( func ) : this function will execute the "func" function injecting all dependencies based on function args` | ||
|
||
usage | ||
===== | ||
|
@@ -53,6 +55,12 @@ It's also possible to pass a custom import function to loadDir, for example | |
|
||
**Note**: All load functions are sync and are meant to be called on startup. | ||
|
||
It's possible to exec a function loading all dependencies | ||
|
||
acqua.exec(function (dependencyOne, dependencyTwo) { | ||
// function call | ||
}); | ||
|
||
author | ||
===== | ||
Sérgio Marcelino ([email protected]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters