mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-18 14:20:06 +01:00
implement importNewModule (#294)
* implement importNewModule Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * make apis available on input object Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update docs Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * minor updates and more docs Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * major refactor simplify module loading Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * final updates and invert installed from npm Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update contributing.md Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fixes Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update documentation Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
committed by
Jeffrey Warren
parent
0c0147354e
commit
42d49112ef
20
test/modules/testModule/Module.js
Normal file
20
test/modules/testModule/Module.js
Normal file
@@ -0,0 +1,20 @@
|
||||
module.exports = function testModule(options, UI) {
|
||||
|
||||
var output;
|
||||
function draw(input, callback) {
|
||||
|
||||
var output = function(input) {
|
||||
return input;
|
||||
}
|
||||
|
||||
this.output = output(input); // run the output and assign it to this.output
|
||||
callback();
|
||||
}
|
||||
|
||||
return {
|
||||
options: options,
|
||||
draw: draw,
|
||||
output: output,
|
||||
UI: UI
|
||||
}
|
||||
}
|
||||
5
test/modules/testModule/info.json
Normal file
5
test/modules/testModule/info.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "test",
|
||||
"description": "Outputs the same image.",
|
||||
"inputs": {}
|
||||
}
|
||||
Reference in New Issue
Block a user