79174660

Date: 2024-11-10 10:32:13
Score: 0.5
Natty:
Report link

Keep It Simple!

You can use lnk-cli to create a directory link.

Here’s my setup using TypeScript:

Step 1: Install lnk-cli

Step 2: Common Folder

enter image description here

Only include the code files you want (no package.json, tsconfig.json, etc.)

Step 3: Package.json

enter image description here

See the highlighted text. Just add the "lnk" command to create the directory link before watching the TypeScript files.

Step 4: .gitignore

enter image description here

The common folder has the main code, so you can ignore these linked folders. Any changes in one of the three locations (common, functions/common, or server/common) will automatically reflect in all linked locations.

Done!

enter image description here

Now you can import the common files like this. (No additional need to adjust tsconfig.json)

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • RegEx Blacklisted phrase (1): I want
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Edelcio Molina