title: Creating a typescript test package which can be used as a package
body: <p>I have created a test automation ts project which runs mocha tests through the command:</p>
  <pre><code>npm run start
  </code></pre>
  <p>Where the <strong>start</strong> script is an alias to:</p>
  <pre><code>ts-mocha -p tsconfig.json src/tests/*.test.ts --timeout 30000 --exit
  </code></pre>
  <p>My goal is to take this test automation package, and use it independently from another machine (for example to run it in a CI process without checking out the code), something like this call:</p>
  <pre><code>npx automation-package test
  </code></pre>
  <p>Will result in running the exact same ts-mocha script in the original package.</p>
  <p>I've read about adding commands in package.json that can be used externally by adding the script in package.json:</p>
  <pre><code>&quot;bin&quot;: {&quot;lib/index.ts&quot;}
  </code></pre>
  <p>But how can I run applicatively the ts-mocha command.
  I believe that I miss something here or there is just no way to do what I intend doing.</p>