-
Notifications
You must be signed in to change notification settings - Fork 134
Description
It would probably be nice to be able to have the dependency list as an optional input parameter to spago init, especially when working with existing packages based on bower. I suspect this is somehow related to #24 but I wasn't sure about the main focus there (most links there refer to no longer existing pages, e.g. from-bower scripts). Alternatively, one could optionally, define dependencies list in separate file spago-dependencies.json (which, being a simple list of strings, would also be a valid dhall file imported by spago.dhall). This file could be generated or overwritten by a simple script (probably, as a temporary solution before deciding whether to integrate the dependency import functionality deeper into the spago tool or not - most likely, it should remain a separate command/script keeping in mind the principle of separation of concerns), e.g.
jq '(.dependencies? | keys? // []) + (.devDependencies? | keys? // []) | map(ltrimstr("purescript-"))' ./bower.json > spago-dependencies.json
cat spago.dhall
{ name =
"package-name"
, dependencies =
./spago-dependencies.json
, packages =
./packages.dhall
}