goatslacker

  • Archive
  • RSS
  • Ask me anything

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"
}
    • #coffeescript
    • #node.js
    • #travis-ci
    • #continuous integration
    • #cakefile
    • #npm
  • 2 months ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

About

Software Engineering, Music, Sports
  • @goatslacker on Twitter
  • Facebook Profile
  • goatslacker on Last.fm
  • goatslacker on Grooveshark
  • Linkedin Profile
  • goatslacker on github

Twitter

loading tweets…

Posts I like

See more →
  • Video via izs
    Video

    Watch this video. I really like a lot of what he has to say. Two main comments:

    1. 165 Exceptions in the standard library, is enough!? Are you...
    Video via izs
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Josh Perez. Effector Theme by Carlo Franco.

Powered by Tumblr