From c1e831abb73950d8458f7ddf1c643c470a7a1247 Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 19 Mar 2020 23:12:14 +0900 Subject: [PATCH] The compiler generate a variable "Elm" in the global space. This variable usually has the methods "Elm.Main.init" (for Elm version 0.19) or "Elm.Main.embed" (for Elm verison 0.18 or erlier). It can also be initialized with other methods, such as "Elm.SpecificMethod.init" but usually "Main" is the default. "Elm" only as detection method can create false positive, being very short. So I gave it a confidence of 50%. This detection misses all cases where Elm is wrapped in a "Self-Executing Anonymous Function". This is probably a common case, as it happens, for example, using Webpack, Parcel or other binders. In this case I don't know any way to detect Elm, unless analysing the code itself. I also added the detection of an Elm library, elm-ui, that is very popular and leave a signature in the rendered html. I used the regular expression "