node-ark
A Node application creator about plugin architecture approach.
Quick Example
Create your module with npm
mkdir -p plugins/myMainPackagercd plugins/myMainPackagernpm inittouch index.js
Create a plugin plugins/myMainPackager/index.js
module { importsmyValueExported = 123; ; // call done when finish it}
Your main.js
script:
var ark = ; ark
Here is your package.json
:
Dependencies
Edit the package.json
from plugin that require the dependency.
Create a new plugin
Create a new package.json
:
Create the target plugin plugins/myAnotherPlugin/myPluginSetup.js
:
module { importsshareThisObject = name: "Amazing plugin system" { return thisname + " is running" } ; ; // call done when finish it}
Then, from myMainPackager.js
plugin you can do access the shared object:
module { var sharedObject = importsshareThisObject; console; console; ; // call done when finish it}