mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Return file path
This commit is contained in:
parent
2c596edd59
commit
449136fd43
@ -30,7 +30,7 @@ main =
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
parseThings : Flags -> String
|
parseThings : Flags -> ( String, String )
|
||||||
parseThings flags =
|
parseThings flags =
|
||||||
let
|
let
|
||||||
elmJson : Result String Elm.Project.PackageInfo
|
elmJson : Result String Elm.Project.PackageInfo
|
||||||
@ -57,7 +57,7 @@ parseThings flags =
|
|||||||
str
|
str
|
||||||
|
|
||||||
Err error ->
|
Err error ->
|
||||||
error
|
( "", error )
|
||||||
|
|
||||||
|
|
||||||
formatValue value =
|
formatValue value =
|
||||||
@ -165,7 +165,7 @@ capitalize s =
|
|||||||
String.toUpper (String.left 1 s) ++ String.dropLeft 1 s
|
String.toUpper (String.left 1 s) ++ String.dropLeft 1 s
|
||||||
|
|
||||||
|
|
||||||
formatFile : Elm.Project.PackageInfo -> List Elm.Docs.Module -> String
|
formatFile : Elm.Project.PackageInfo -> List Elm.Docs.Module -> ( String, String )
|
||||||
formatFile elmJson docsJson =
|
formatFile elmJson docsJson =
|
||||||
let
|
let
|
||||||
listOfModuleNames list =
|
listOfModuleNames list =
|
||||||
@ -194,7 +194,8 @@ formatFile elmJson docsJson =
|
|||||||
dependencyModules =
|
dependencyModules =
|
||||||
listOfThings formatModule docsJson
|
listOfThings formatModule docsJson
|
||||||
in
|
in
|
||||||
"module " ++ moduleName ++ """ exposing (dependency)
|
( "src/" ++ String.replace "." "/" moduleName ++ ".elm"
|
||||||
|
, "module " ++ moduleName ++ """ exposing (dependency)
|
||||||
|
|
||||||
import Elm.Constraint
|
import Elm.Constraint
|
||||||
import Elm.Docs
|
import Elm.Docs
|
||||||
@ -270,6 +271,7 @@ unsafeConstraint constraint =
|
|||||||
-- Disables the tail-call optimization, so that the test crashes if we enter this case
|
-- Disables the tail-call optimization, so that the test crashes if we enter this case
|
||||||
|> identity
|
|> identity
|
||||||
"""
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
formatPackageName : Elm.Package.Name -> String
|
formatPackageName : Elm.Package.Name -> String
|
||||||
@ -277,4 +279,4 @@ formatPackageName packageName =
|
|||||||
"Elm.Package.fromString " ++ stringify (Elm.Package.toString packageName) ++ " |> Maybe.withDefault Elm.Package.one"
|
"Elm.Package.fromString " ++ stringify (Elm.Package.toString packageName) ++ " |> Maybe.withDefault Elm.Package.one"
|
||||||
|
|
||||||
|
|
||||||
port sendToJs : String -> Cmd msg
|
port sendToJs : ( String, String ) -> Cmd msg
|
||||||
|
Loading…
Reference in New Issue
Block a user