How to use cmd-shim - 3 common examples

To help you get started, we’ve selected a few cmd-shim examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lerna / lerna / test / FileSystemUtilities.js View on Github external
it("creates command shim to an executable file", done => {
        const src = path.resolve("./packages/package-2/cli.js");
        const dst = path.resolve("./packages/package-1/node_modules/.bin/package-2");
        const type = "exec";

        cmdShim.mockImplementation(callsBack());

        FileSystemUtilities.symlink(src, dst, type, () => {
          try {
            expect(fs.lstat).not.toBeCalled();
            expect(cmdShim).lastCalledWith(src, dst, expect.any(Function));
            done();
          } catch (ex) {
            done.fail(ex);
          }
        });
      });
github boltpkg / bolt / src / utils / fs.js View on Github external
  await promisify(cb => _cmdShim(currentShimTarget, stripExtension(dest), cb));
}
github nicojs / node-link-parent-bin / src / link.ts View on Github external
return new Promise((res, rej) => {
            cmdShim.ifExists(from, to, (err: any) => {
                if (err) {
                    rej(err);
                } else {
                    res(undefined);
                }
            });
        });
    }

cmd-shim

Used in npm for command line application support

ISC
Latest version published 6 months ago

Package Health Score

90 / 100
Full package analysis