mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Move the contents of node_modules/_app into lib/ as there shouldn't be any content in node_modules. This directory is automatically managed and pruned by npm. Add lib/ as a local package in package.json, this allows scripts everywhere to require it's content as "lib/path" instead of relying on local paths. This shadows the StdLib Node.js Bindings package, but I could care less. Change all requires with lib as a local path and _app to use just lib.
17 lines
385 B
JavaScript
17 lines
385 B
JavaScript
const fileOps = require("fileOps");
|
|
// const config = require("./../config");
|
|
|
|
module.exports = function(config) {
|
|
return {
|
|
sync: function(){
|
|
let instances;
|
|
try {
|
|
instances = fileOps.getDirectoriesSync(config.instanceDirectory);
|
|
} catch (e) {
|
|
// there are no instances created yet, probably missing the folder
|
|
instances = [];
|
|
}
|
|
return instances;
|
|
},
|
|
}
|
|
} |