node-hot_scripts_plugger
This node module lets you load and manage scripts that can be read from the code as well as from a file system.
API
The API can be found under this directory and this one for MD format.
How to use.
var ScriptsPlugger = ;var myScripts = ; // Function to addvar { console;};myScripts; // Let's imagine that a JavaScript function is writen under *scripts/goodbye.js*myScripts; myScripts; // Print 'Hello World'myScripts; // Execute what is defined in the read file // Scripts can be called with how many arguments as wishedvar { return a + b;};myScripts; var result = myScripts;console; // '9'
Scripts read from file
Concerning the scripts added from the file system, please respect the following format:
{ // The code}
You are free to do whatever you want into the function. The only requirement is to define a function your script as a JavaScript anonymous function.
Your scripts will be executed by node, and so, you can feel free to use node modules.