From 340a44291c7bc21b3c52609434580c44d77e1c2d Mon Sep 17 00:00:00 2001 From: Tyson Gach Date: Mon, 6 May 2019 10:49:15 -0400 Subject: [PATCH] Add Middleman detector https://middlemanapp.com/ --- src/detectors/middleman.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/detectors/middleman.js diff --git a/src/detectors/middleman.js b/src/detectors/middleman.js new file mode 100644 index 0000000..6cf3ee8 --- /dev/null +++ b/src/detectors/middleman.js @@ -0,0 +1,16 @@ +const { existsSync } = require("fs"); + +module.exports = function() { + if (!hasRequiredFiles(["config.rb"])) return false; + + return { + type: "middleman", + port: 8888, + proxyPort: 4567, + env: { ...process.env }, + command: "bundle", + possibleArgsArrs: [["exec", "middleman", "server"]], + urlRegexp: new RegExp(`(http://)([^:]+:)${4567}(/)?`, "g"), + dist: "build" + }; +};