Skip to content

Commit

Permalink
Merge pull request #217 from KeesCBakker/decaf-please
Browse files Browse the repository at this point in the history
Decaf please
  • Loading branch information
stephenyeargin authored Aug 30, 2023
2 parents d1807b9 + 64c4cb3 commit ab0599f
Show file tree
Hide file tree
Showing 14 changed files with 4,267 additions and 1,586 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules
.node-version
.idea
.vscode
.nyc_output
*.tgz
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"useTabs": false,
"tabWidth": 2,
"endOfLine": "lf",
"printWidth": 120,
"trailingComma": "es5",
"singleQuote": true
}
12 changes: 0 additions & 12 deletions index.coffee

This file was deleted.

25 changes: 25 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const fs = require('fs');
const path = require('path');

module.exports = function (robot, scripts) {
const scriptsPath = path.resolve(__dirname, 'src', 'scripts');
return fs.exists(scriptsPath, function (exists) {
if (exists) {
return (() => {
const result = [];
for (var 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;
})();
}
});
};
Loading

0 comments on commit ab0599f

Please sign in to comment.