UNPKG

hydux-react-router

Version:
18 lines (15 loc) 354 B
const { execSync } = require('child_process') const changedFiles = execSync('git status') .toString().trim() .split('\n') function changed(path) { return changedFiles .some(l => l.includes(path)) } if (changed('src/') || changed('test/')) { execSync('npm test') } if (changed('src/')) { execSync('npm run build') } execSync('git add -A')