This repository was archived by the owner on Jan 28, 2021. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork1
ad-si/symlink-modules
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Since npm version 3.0.0 npm tries to install the dependency treemaximally flat. (https://github.com/npm/npm/releases/tag/v3.0.0)
This means it is not possible to know in advancewhere the module directory will be on the disk.Therefore statically loading files from a module directorycan not be safely used anymore.
Symlink-modules let's you symlink your dependenciesto a consistent location so that the files can be loaded from there.
npm install --save symlink-modules
symlink-modules<dependency-1><dependency-2>
This will create alinked_modules
directoryand symlink the specified dependencies.
constsymlinkModules=require('symlink-modules')symlinkModules('dependency-1')// orsymlinkModules(['dependency-2','dependency-3'],options)
Possible options:
{linksDirectory:'<path>'// default: linked_modules}
About
Symlink module dependencies to ensure a consistent path to access module-files