clipboard-ts

0.0.4 • Public • Published

Clipboard TS

This script will take TS via argv[2], convert to JS and pass back via process.stdout

Meant to be used with automation apps like Better Touch Tool to make a "Paste as JS" keyboard shortcut.

This package will probably be obsolete once @swc/cli fixes their M1 integration since it should be all doable via the CLI.

Usage

Feel free to add setups for different apps.

To test on the CLI:

npx clipboard-ts "const x = 100";

Better Touch Tool

async (clipboardContentString) => {
  const shellScriptWrapper = {
    script: `PATH=/usr/local/bin/ npx clipboard-ts`,
    launchPath: `/bin/zsh`,
  };

  const result = await runShellScript(shellScriptWrapper);
  return result;
};

Readme

Keywords

none

Package Sidebar

Install

npm i clipboard-ts

Weekly Downloads

6

Version

0.0.4

License

ISC

Unpacked Size

3.35 kB

Total Files

5

Last publish

Collaborators

  • wesbos