Skip to content

Commit 953a69c

Browse files
committed
Remove commands no longer implemented by backend.
1 parent d0ed2bb commit 953a69c

File tree

1 file changed

+1
-44
lines changed

1 file changed

+1
-44
lines changed

src/Compiler/Backend.gren

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module Compiler.Backend exposing
22
( version
33
--
44
, Command(..)
5-
, InitFlags
65
, ReplFlags
76
, MakeFlags
87
, MakeOutput(..)
@@ -174,37 +173,22 @@ isCached permission platform envVars homeDir =
174173

175174
{-| Commands supported by the compiler blob.
176175

177-
* `Init`: generate a gren.json and src directory in the current directory.
178176
* `Repl`: run a REPL.
179177
* `Make`: compile a project
180178
* `Docs`: generate a docs.json file
181-
* `PackageInstall`: install dependencies
182-
* `PackageUninstall`: remove a dependency
183-
* `PackageOutdated`: get a list of outdated dependencies
184179
* `PackageValide`: check if this package is ready to be deployed
185180
* `PackageBump`: bump package version to next compatible semantic version
186181
* `PackageDiff`: calculate the API-difference between this package and another version.
187182
-}
188183
type Command
189-
= Init InitFlags
190-
| Repl ReplFlags
184+
= Repl ReplFlags
191185
| Make MakeFlags
192186
| Docs DocsFlags
193-
| PackageInstall (Maybe PackageName)
194-
| PackageUninstall PackageName
195-
| PackageOutdated
196187
| PackageValidate
197188
| PackageBump
198189
| PackageDiff DiffArgs
199190

200191

201-
{-|-}
202-
type alias InitFlags =
203-
{ package : Bool
204-
, platform : Platform
205-
}
206-
207-
208192
{-|-}
209193
type alias ReplFlags =
210194
{ interpreter : Maybe String
@@ -304,14 +288,6 @@ encodeCommand options command =
304288
commandEncoder : Bool -> (Path -> String) -> Command -> Json.Value
305289
commandEncoder interactive pathToString command =
306290
when command is
307-
Init flags ->
308-
Json.object
309-
[ { key = "command", value = Json.string "init" }
310-
, { key = "interactive", value = Json.bool interactive }
311-
, { key = "package", value = Json.bool flags.package }
312-
, { key = "platform", value = Platform.toJson flags.platform }
313-
]
314-
315291
Repl flags ->
316292
Json.object
317293
[ { key = "command", value = Json.string "repl" }
@@ -347,25 +323,6 @@ commandEncoder interactive pathToString command =
347323
, { key = "report-json", value = maybeToBool flags.report }
348324
]
349325

350-
PackageInstall maybePackage ->
351-
Json.object
352-
[ { key = "command", value = Json.string "packageInstall" }
353-
, { key = "interactive", value = Json.bool interactive }
354-
, { key = "package", value = maybeEncoder PackageName.toJson maybePackage }
355-
]
356-
357-
PackageUninstall package ->
358-
Json.object
359-
[ { key = "command", value = Json.string "packageUninstall" }
360-
, { key = "interactive", value = Json.bool interactive }
361-
, { key = "package", value = PackageName.toJson package }
362-
]
363-
364-
PackageOutdated ->
365-
Json.object
366-
[ { key = "command", value = Json.string "packageOutdated" }
367-
]
368-
369326
PackageValidate ->
370327
Json.object
371328
[ { key = "command", value = Json.string "packageValidate" }

0 commit comments

Comments
 (0)