Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

Commit

Permalink
test: add standard style
Browse files Browse the repository at this point in the history
  • Loading branch information
sbolel committed Sep 29, 2020
1 parent 5db94fb commit fc6f8fb
Show file tree
Hide file tree
Showing 3 changed files with 709 additions and 65 deletions.
12 changes: 8 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ const path = require('path')
const promisify = require('util').promisify
const exec = promisify(require('child_process').exec)

async function execScript(filename) {
const scripts = [
'osx-setup.sh',
'osx-security.sh'
]

async function execScript (filename) {
try {
const { stdout, stderr } = await exec(`./${path.resolve(__dirname, filename)}`)
console.log('stdout:', stdout)
Expand All @@ -12,9 +17,8 @@ async function execScript(filename) {
}
}

async function main() {
await execScript('osx-setup.sh')
await execScript('osx-security.sh')
async function main () {
await Promise.all(scripts.map(execScript))
}

main()
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"private": true,
"scripts": {
"test": "standard",
"semantic-release": "semantic-release"
},
"repository": {
Expand Down Expand Up @@ -32,10 +33,12 @@
"@semantic-release/npm": "^7.0.6",
"@semantic-release/release-notes-generator": "^9.0.1",
"husky": "^4.3.0",
"semantic-release": "^17.1.2"
"semantic-release": "^17.1.2",
"standard": "^14.3.4"
},
"husky": {
"hooks": {
"pre-commit": "standard --fix",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
Expand Down
Loading

0 comments on commit fc6f8fb

Please sign in to comment.