Consider making an easily pluginable system for danger process langs
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 381
- Avg merge
- 2h 8m
- Merged PRs (30d)
- 6
Description
E.g. `danger process swift` would handle the installation (either via mint/marathon/brew/whatever) and then run the actual command for you. I'd imagine it being something like an array you could define:
Perhaps this could even live outside of Danger JS in a separate repo:
```js
/**
* Docs for the Swift version, blah blah. Args does x, y.
**/
const swift = {
install: (args) => {
if (platform.os === "mac") {
if(!exists("brew")) { // install brew }
shell("brew install mint")
} else {
// ...
}
}
shell(`mint install danger/danger-js ${args}`)
},
exec: (args) => "danger-swift"
}
export {
swift
}
```
Including the args and functions so you could say something like `danger process swift 0.2.3` and that 0.2.3 can get passed to the install/exec functions.
We can generate a page on danger.systems using TSDoc covering how they work.
`danger process` can download and eval the file (there's a compile function inside Danger so it can use modern features, or we can just put CI on node 6 for that repo and call it a day) and then see if any of the exports are the same as the first arg after process.
Contributor guide
Assessment
This issue has not been assessed yet.