TSD & Travis CI: “GitHub rate limit reached”

If you are using Travis CI to automate the build of a TypeScript, that’s a problem you probably encountered. As Travis CI can allow you to automatically build in various environment, TSD is hitting hard on the GitHub API, which can cause the “GitHub rate limit reached” message to appear.


The solution is quite simple, you’ll have to create a GitHub token and add it in Travis as an environment variable. This tutorial will also work with any build automation system that support environment variables.
Continue reading

Packaging uncompiled TypeScript code in a NPM module

Writing a node module in TypeScript and publishing it in its original form on NPM is not as straightforward as it should be, because this system was originaly designed for Javascript modules only.

The challenge is to properly package the typing information from your TypeScript code, that may get lost in the process if you don’t do it the right way.
That’s why I decided to put together the information I gathered while addressing the issue.

In this tutorial, I will explain the easiest way to package some TypeScript code into a node module, preserving all the typing information from the source code, without using any third-party tool.

You can download the full sample project on my GitHub repo. It is a working example of a TypeScript package.
Continue reading