mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Add Review.Project.removeDependency
This commit is contained in:
parent
d6696121f6
commit
5316aa057b
@ -3,7 +3,7 @@ module Review.Project exposing
|
||||
, ProjectModule, addModule, addParsedModule, removeModule, modules, modulesThatFailedToParse, precomputeModuleGraph
|
||||
, addElmJson, elmJson
|
||||
, addReadme, readme
|
||||
, addDependency, removeDependencies, dependencies
|
||||
, addDependency, removeDependency, removeDependencies, dependencies
|
||||
)
|
||||
|
||||
{-| Represents the contents of the project to be analyzed. This information will
|
||||
@ -37,7 +37,7 @@ does not look at project information (like the `elm.json`, dependencies, ...).
|
||||
|
||||
# Project dependencies
|
||||
|
||||
@docs addDependency, removeDependencies, dependencies
|
||||
@docs addDependency, removeDependency, removeDependencies, dependencies
|
||||
|
||||
-}
|
||||
|
||||
@ -381,6 +381,13 @@ addDependency dependency (Internal.Project project) =
|
||||
}
|
||||
|
||||
|
||||
{-| Remove a dependency from a project by name.
|
||||
-}
|
||||
removeDependency : String -> Project -> Project
|
||||
removeDependency dependencyName (Internal.Project project) =
|
||||
Internal.Project { project | dependencies = Dict.remove dependencyName project.dependencies }
|
||||
|
||||
|
||||
{-| Remove all dependencies of a project. Use this to flush the dependencies of
|
||||
a project when they are changed, before re-adding them.
|
||||
-}
|
||||
|
Loading…
Reference in New Issue
Block a user