Uses this documentation and its inspired by this article.
The feature branches have some experiments on:
- Basic Typescript (merged)
- Basic ES5 Javascript
- Basic ES6 Javascript
The main entry is inside the src folder as main.ts
This process is done in the package.json prepublish script which just calls the compiler.
Thx to tsconfig.json the typescript compiler will output the files into the lib folder.
cd path/to/package
npm link # should install a global symlink
cd path/to/consumer/
npm link packageName # will create a symlink locally
npm pack
then tar -tf packagename-version.tgz
after than u can:
cd path/to/consumer/
npm install ../path/to/package/packagename-version.tgz
Extracted from This article
ts-node makes all the magic happen.