Skip to content

Commit

Permalink
Adds travis CI support (#64)
Browse files Browse the repository at this point in the history
* Adds travsi CI support

* Adds trusty dist to travis runs

* Changes to install latest `npm` version

* Adds strict mode

* Adds linting for supported es6 features.

* Adds stages to travis job

* Changes spread operator to apply

* Installs `libnotify-bin` on travis test machine

* Changes to only run apt-get on linux
  • Loading branch information
deiga authored Jul 16, 2017
1 parent 3163f4a commit 4b022b1
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 31 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"extends": "airbnb-base",
"extends": ["airbnb-base", "eslint:recommended", "plugin:node/recommended"],
"plugins": [
"import"
"import",
"node"
],
"rules": {
"no-console": ["error", { "allow": ["warn", "error"] }]
},
"env": {
"node": true
"node": true,
"es6": true
}
}
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: node_js
dist: trusty
os:
- linux
- osx
node_js:
- '4'
- '5'
- '6'
- '7'
- 'node'
before_install:
- npm i -g npm@latest
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libnotify-bin; fi
jobs:
include:
- stage: lint
script: npm run lint
- stage: test
script: npm test
4 changes: 3 additions & 1 deletion lib/growl.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

// Growl - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)

/**
Expand Down Expand Up @@ -292,7 +294,7 @@ function growl(msg, opts, callback) {
const splitCmd = command.split(' ');
if (splitCmd.length > 1) {
command = splitCmd.shift();
args.push(...splitCmd);
Array.prototype.push.apply(args, splitCmd);
}
if (customCmd.indexOf('%s') < 0) {
args.push(message);
Expand Down
57 changes: 30 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
},
"engines": {
"node": ">=4.x"
},
"dependencies": {
"eslint-plugin-node": "^5.1.0"
}
}

0 comments on commit 4b022b1

Please sign in to comment.