title: Use an npm script as "bin"
body: <p>I have a command line application written in TypeScript with some npm scripts defined in <code>package.json</code>.</p>
  
  <pre><code>  "scripts": {
      "start": "ts-node src/index.ts",
      "start-args": "ts-node src/index.ts -- some args"
    },
  </code></pre>
  
  <p>I would like to link and alias the TypeScript file so that I can call the program easily, so I am looking for something like a <code>"bin"</code> key in the <code>package.json</code> file.</p>
  
  <pre><code>  "scripts": {
      "start": "ts-node ./src/index.ts",
      "start-args": "ts-node src/index.ts -- some args"
    },
    "bin": {
      "foobar": "./src/index.ts",
      "bazqux": "./src/index.ts some args"
    }
  </code></pre>
  
  <p><code>ts-node</code> is installed locally.</p>
  
  <p>However, since TypeScript is not natively supported by node, just putting a shebang on <code>./src/index.ts</code> won't work.</p>
  
  <p>I would also like to be able to create an aliased command with default arguments, like <code>bazqux</code> above. When I link or install the package as global, I can run "foobar" globally as if I run "npm run start" inside the repository; or run "bazqux" globally as it's "npm run start-args".</p>
  
  <p>How to achieve this?</p>