abswap
- Swap Files or Directories using Symlinks
npm | yarn |
---|---|
npm install --global abswap |
yarn global add abswap |
Usage: abswap [options] <path>
Options:
-V, --version output the version number
--init initialize a path for a/b swap
--copy copy existing path to inactive selection on initialize
--file expect (or create) regular files as targets
--directory expect (or create) directory as targets
--undo delete a/b structure and keep active selection
--verify verify a/b structure for consistence
-h, --help output usage information
const { init, swap, undo } = require("abswap");
const PATH = "/tmp/example-path";
async function demo() {
// Initialize a/b structure
await init(PATH, { directory: true, copy: true });
// Swap symlinks pointing to 'a' and 'b'.
await swap(PATH);
// Undo a/b structure and keep current selected directory.
await undo(PATH);
}
v2.2.0
--verify
to check for a valid a/b structure.v2.1.0
package.json
.v2.0.0
v1.0.0
--undo
to convert a/b structure back to a simple file or directory.v0.3.0
--copy
to copy existing file or directory to inactive selection on initialize.v0.2.0
--file
and --directory
to select file or directory mode.v0.1.3
Pull requests, patches, emails, issues, what ever, are welcomed!
This project is licensed under the MIT License - see LICENSE for details.