Skip to content

Commit

Permalink
ci(travis): Add Travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
nprail committed Jun 14, 2018
1 parent 103bdf4 commit a75cec8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ typings/


# End of https://www.gitignore.io/api/node,code

tests/
npm-audit.html
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: node_js
node_js:
- "node"
cache:
directories:
- ~/.npm
script:
- npm test
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<p align="center">
<a href="http://commitizen.github.io/cz-cli/"><img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg" alt="Commitizen friendly"></a>
<a href="https://standardjs.com"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg" alt="JavaScript Style Guide"></a>
<a href="https://travis-ci.com/Filiosoft/npm-audit-html"><img src="https://travis-ci.com/Filiosoft/npm-audit-html.svg?branch=master" alt="Build Status"></a>

</p>
<p align="center"><b>Generate a HTML report for NPM Audit</b></p>

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
"npm-audit-html": "index.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint '*.js' 'lib/**/*.js' -f node_modules/eslint-html-reporter/reporter.js -o tests/eslint.html",
"test": "npm run lint && npm run audit-report && npm audit",
"lint": "eslint '*.js' 'lib/**/*.js' -f node_modules/eslint-html-reporter/reporter.js -o tests/eslint.html || true && eslint '*.js' 'lib/**/*.js'",
"lint:fix": "eslint '*.js' 'lib/**/*.js' --fix",
"lint!": "npm run format && npm run lint:fix",
"format": "prettier --write '*.js' 'lib/**/*.js'",
"audit-report": "npm audit --json | node index.js -o tests/npm-audit.html",
"cm": "git-cz",
"pre-commit": "lint-staged"
},
Expand Down

0 comments on commit a75cec8

Please sign in to comment.