Adding a CoffeeScript project to Travis-CI
Say you have this project you wrote in CoffeeScript and you want to add it to Travis-CI
but you do not want to include the compiled output in your code repository. Well, you will need to tell Travis to compile your project first before running the tests otherwise they would fail.
But how?
Add this to your .travis.yml
before_script:
coffee -c -o lib src
Commands under before_script run before the unit tests are ran. So use CoffeeScript to compile your project before running the tests.
You will obviously need coffee-script as a dev_dependency in your package.json
"devDependencies": {
"coffee-script": "latest"
}
Alternatively you can just use this Cakefile and add the following to your package.json instead
"scripts": {
"test": "cake test"
}
Introducing gister
A nodejs module for programmatic access to create, edit and retrieve gists from github.
There are quite a few gist libraries available from npm. Most were CLI apps to create new gists, others didn’t exactly meet my needs. So I set out to create gister which provides what I think is a simple API. It follows the observer pattern and uses request to talk to GitHub.
Read the annotated source or check out the code.
Using it is really simple. Here’s how you retrieve a gist with gist_id = 1:
var gist = new Gist({ gist_id: 1 });
gist.on('get', function (data) {
// do something with data
});
gist.get();
Creating a new gist is similar, although you’ll need to provide Gist with your GitHub username and Secret API Token which can be found in your Account Settings
var gist = new Gist({ username: 'goatslacker', token: 'abc123' });
gist.on('created', function (data, gist_id) {
// gist_id is the newly created gist id
// data is what github returns in it's reply
});
gist.create();
Available on npm. Install:
npm install gister
Introducing Fly!
Pretty colors for your console applications written using NodeJS Easily output some styles to console from your NodeJS application. Get it via npm: npm install fly And checkout the README on GitHub