New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

virtual-directory

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

virtual-directory

virtual directory

  • 1.0.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
Maintainers
1
Weekly downloads
 
Created
Source

virtual directory

input

  • src directory
  • exclusions
  • output directory

output

  • a virtual directory symlinked without the exclusions

cli usage

virtual-directory --dest virtual-project --src my-project --exclusions "node_modules/execa node_modules/express"

.virtualdirectory file usage

create .virtualdirectory file in the source directory in the correct format and just run the command virtual-directory from that directory

.virtualdirectory format

/dest/directory

/src/directory/exclusion/1
/src/directory/exclusion/2
/src/directory/exclusion/3 -> /different/src/directory/3
/src/directory/very/very/very/deep/exclusion

node api usage

import virtualDirectory from 'virtual-directory'

await virtualDirectory(
    'src/directory/',
    'dest/directory',
    ['node_modules/@types/react', 'node_modules/@types/react-dom'],
)

watch mode

enable watch mode by adding --watch flag

what it does

let's say you have this file structure

project/
|- node_modules/
   |- @babel
      |- ...
   |- @types
      |- ...
   |- express
      |- ...
   |- react
      |- ...
|- src
   |- index.ts
   |- executor.ts
   |- types.ts
|- .nvmrc
|- tsconfig.json

but for some reason you don't want the .nvmrc file, react and express,

write the command

virtual-directory virtual-project project .nvmrc node_modules/express node_modules/react

which will generate this file structure

virtual-project/
|- node_modules/
   |- @babel (linked to project/node_modules/@babel)
      |- ...
   |- @types (linked to project/node_modules/@types)
      |- ...
|- src (linked to project/src)
|- tsconfig.json (linked to project/tsconfig.json)

Keywords

FAQs

Package last updated on 11 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc