Skip to content

Commit

Permalink
Bump Husky, update other packages
Browse files Browse the repository at this point in the history
Spring cleaning 🧹
  • Loading branch information
stephenyeargin committed Mar 31, 2021
1 parent c04d0dc commit 4a92e34
Show file tree
Hide file tree
Showing 6 changed files with 8,486 additions and 1,732 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
29 changes: 7 additions & 22 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
const fs = require('fs');
const path = require('path');
'use strict'

module.exports = function(robot, scripts) {
const scriptsPath = path.resolve(__dirname, 'src');
return fs.exists(scriptsPath, function(exists) {
if (exists) {
return (() => {
const result = [];
for (let script of Array.from(fs.readdirSync(scriptsPath))) {
if ((scripts != null) && !Array.from(scripts).includes('*')) {
if (Array.from(scripts).includes(script)) { result.push(robot.loadFile(scriptsPath, script)); } else {
result.push(undefined);
}
} else {
result.push(robot.loadFile(scriptsPath, script));
}
}
return result;
})();
}
});
};
const path = require('path')

module.exports = (robot) => {
const scriptsPath = path.resolve(__dirname, 'src')
robot.loadFile(scriptsPath, 'youtube.js')
}
Loading

0 comments on commit 4a92e34

Please sign in to comment.