Skip to content

Instantly share code, notes, and snippets.

@juliangruber
Last active December 21, 2015 08:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save juliangruber/6276725 to your computer and use it in GitHub Desktop.
Save juliangruber/6276725 to your computer and use it in GitHub Desktop.
add travis and testling to your project and get batches for the README in one command
function ci() {
echo -e "$(testlingify &> /dev/null && testlingify badge)\n\n\
$(travisify &> /dev/null && travisify badge)"
}
# with nodei.co badge
function ci() {
name=$(node -pe 'require("./package").name')
echo -e "[![NPM](https://nodei.co/npm/$name.png)](https://nodei.co/npm/$name)\n\n\
$(testlingify &> /dev/null && testlingify badge)\n\n\
$(travisify &> /dev/null && travisify badge)"
}

Example output:

[![testling badge](https://ci.testling.com/juliangruber/level-average.png)](https://ci.testling.com/juliangruber/level-average)

[![build status](https://secure.travis-ci.org/juliangruber/level-average.png)](http://travis-ci.org/juliangruber/level-average)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment