diff --git a/lib/npmPostinstall.js b/lib/npmPostinstall.js new file mode 100644 index 00000000..c0e6beae --- /dev/null +++ b/lib/npmPostinstall.js @@ -0,0 +1,18 @@ +var mkdirp = require("mkdirp"); + +var directories = [ + "database/linvodb", + "sharedMods", + "instances", +]; + +directories.forEach(path => { + mkdirp("database/linvodb", function(err){ + if(err){ + console.error("Unable to mkdirp "+path); + console.error(err); + } else { + console.log("mkdirp "+path); + } + }); +}) diff --git a/package.json b/package.json index ced135e4..362bbd44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clusterio", - "version": "1.7.1", + "version": "1.7.0", "description": "Interserver communication for factorio", "repository": "https://github.com/Danielv123/factorioClusterio", "main": "master.js", @@ -9,7 +9,8 @@ "start": "echo Run node client.js start [instance] to start slaves && node master.js", "cover": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- \"./{,!(node_modules)/**/}*.spec.js\" -R spec || echo . && codecov -t f7b38085-36eb-4d72-84e6-64721910171e", "docs": "documentation build index.js --config documentation.yml -f html -o docs", - "livedocs": "documentation serve --watch *.js lib/** --config documentation.yml" + "livedocs": "documentation serve --watch *.js lib/** --config documentation.yml", + "install": "node lib/npmPostinstall.js" }, "keywords": [ "factorio"