mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Allow node modules to include example flows
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright 2015 IBM Corp.
|
||||
* Copyright 2015, 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -174,6 +174,8 @@ function uninstallModule(module) {
|
||||
} else {
|
||||
log.info(log._("server.install.uninstalled",{name:module}));
|
||||
reportRemovedModules(list);
|
||||
// TODO: tidy up internal event names
|
||||
events.emit("node-module-uninstalled",module)
|
||||
resolve(list);
|
||||
}
|
||||
}
|
||||
|
@@ -184,6 +184,12 @@ function getModuleNodeFiles(module) {
|
||||
}
|
||||
}
|
||||
}
|
||||
var examplesDir = path.join(moduleDir,"examples");
|
||||
try {
|
||||
fs.statSync(examplesDir)
|
||||
events.emit("node-examples-dir",{name:pkg.name,path:examplesDir});
|
||||
} catch(err) {
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user