link-dep
Module to link dependencies to static folder.
For some reason you might want to use a install dependency in let's say your index.html file which might be served from express
Usage
Pass in a string as the first argument. The second argument is where you would like to place the copied module
const linkDep = ; await ;
Pass in an array as the first argument for copying multiple dependencies.
const linkDep = ; await ;
util function with try / catch
const linkDep = ; { try await ; catch error throw "Noo" error; }…await ;
then / catch
const linkDep = ; ; ;
express
Together withconst path = ;const express = ;const linkDep = ; const app = ;// `sayHi`-module doesn't exist on npm, it's created at the bottom, btw it's really complex. 🧠// the module is just for demostration purposesawait ; app;app; // index.html<script src="static/script/say-hi">// some-depenedency will now be ran ………………………………………………………………………………………………………………………………………………………… // say-hi module moduleexports = console;