1.0.2 • Published 5 years ago

sym-lnk v1.0.2

Weekly downloads
7
License
ISC
Repository
github
Last release
5 years ago

sym-lnk

Manage symbolic links based on aliases.

Install

$ npm install sym-lnk

Usage

const symlink = require("sym-lnk");

symLink.addSymlink({
  configs: [
    {
      path: "/Users/liufang/Neteasework/front-study",
      alias: "front-study"
    },
    {
      path: "/Users/liufang/Neteasework/front-study-web",
      alias: "front-study-web"
    },
    {
      path: "/Users/liufang/Neteasework/front-study-cp",
      alias: "front-study-cp"
    }
  ]
});

symLink.rmSymlink({
  configs: [
    {
      path: "/Users/liufang/Neteasework/front-study",
      alias: "front-study"
    },
    {
      path: "/Users/liufang/Neteasework/front-study-web",
      alias: "front-study-web"
    },
    {
      path: "/Users/liufang/Neteasework/front-study-cp",
      alias: "front-study-cp"
    }
  ]
});

API

addSymlink

add symbolic links according to configuration in current path.

  • config (Array)

    • path:symbolic target path
    • alias: symbolic source alias
  • force (Boolean) if symbolic link is exists,delete it and reconstruct.

rmSymlink

remove symbolic links according to configuration in current path.

  • config (Array)

    • path:symbolic target path
    • alias: symbolic source alias

Want to contribute?

Any idea to improve this project would be greatly appreciated.

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.1

5 years ago