spago icon indicating copy to clipboard operation
spago copied to clipboard

A command to add remote/local packages

Open wclr opened this issue 3 years ago • 2 comments

What do you think about the command for adding remote repo packages like:

spago add https://github.com/Unisay/purescript-facebook

spago could read remote bower.json (or spago.dhall if exsists) for the dependencies list and the name.

and would automatically do what described here: https://github.com/purescript/spago#add-a-package-to-the-package-set

let upstream = -- <package set URL here>
in  upstream
  with facebook =
    { dependencies =
        [ "console"
        , "aff"
        , "prelude"
        , "foreign"
        , "foreign-generic"
        , "errors"
        , "effect"
        ]
    , repo =
        "https://github.com/Unisay/purescript-facebook.git"
    , version =
        "v0.3.0"  -- branch, tag, or commit hash
    }

This could also work for adding local packages like:

spago add ./my-package --name override-pkg-name

if locates spago.dhall would add to packages.dhall:

with  override-pkg-name =  ./my-package/spago.dhall as Location

wclr avatar Aug 03 '21 10:08 wclr

Is this a duplicate of #404?

f-f avatar Aug 03 '21 15:08 f-f

I believe the kind of.

wclr avatar Aug 03 '21 21:08 wclr