-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #217 from KeesCBakker/decaf-please
Decaf please
- Loading branch information
Showing
14 changed files
with
4,267 additions
and
1,586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ node_modules | |
.node-version | ||
.idea | ||
.vscode | ||
.nyc_output | ||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
})(); | ||
} | ||
}); | ||
}; |
Oops, something went wrong.