Add DOUGAL_ROOT symlink to node_modules.

This can be used as a shortcut when requiring a module from deep
within the file hierarchy, e.g., instead of:

require("../../../../lib/db");

one can do:

require("DOUGAL_ROOT/lib/db");
This commit is contained in:
D. Berge
2022-05-06 14:08:19 +02:00
parent fd37e8b8d6
commit c5b6c87278

View File

@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "redoc-cli bundle ./spec/openapi.yaml -o ./spec/openapi.html"
"postinstall": "[[ -e ./node_modules/DOUGAL_ROOT ]] || ln -s .. ./node_modules/DOUGAL_ROOT; redoc-cli bundle ./spec/openapi.yaml -o ./spec/openapi.html"
},
"author": "Aaltronav s.r.o.",
"license": "UNLICENSED",