Create a dangerfile and run it. (Installs danger if missing)
npx dangerfile
Add this bin right next to your dangerfile (dangerfile.js)
#!/usr/bin/env node
const dangerfile = require('dangerfile');
(async() => {
try {
const message = await dangerfile(__dirname);
console.info(message);
} catch (error) {
console.error(error);
process.exit(1);
}
})();
The script prioritises local dangerfile above introduced one, unless 'force' flag was passed
await dangerfile(__dirname, {force: true});