Skip to content

Commit

Permalink
doc updates - mainly for schema updates and dependency management
Browse files Browse the repository at this point in the history
  • Loading branch information
bbarker committed Dec 17, 2020
1 parent 9ccf69c commit 2585c40
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@ the command in the container with the CWD mounted and then exit. Alternatively
if you want to issue multiple commands in the container quickly, you can
run `./psc.sh bash`.

## Updating Dependendencies or the Metajelo Schema

Dependencies for JavaScript are minimal and are controlled by [npm](https://docs.npmjs.com/)
and specified in `package.json`. PureScript dependencies are controlled by
[spago](https://github.com/purescript/spago) and specified
in `spago.dhall`, but in some cases, packages not included in the standard package
set must also be described in `packages.dhall`. In particular, when updating
the Metajelo schema to be used in metajelo-ui, it will be necessary to specify
a new version of `purescript-metajelo` (with the `purescript-` prefix dropped
in `packages.dhall`). This can simply be done by specifying a git commit hash
or by specifying a version in the relevant section of `packages.dhall`.

See the [purescript-metajelo documentation](https://github.com/labordynamicsinstitute/purescript-metajelo#a-note-on-source-generation)
for details.

It may also be required from time to time to update other dependencies, especially
`metajelo-web`.

## Debugging

For an unminified build that is easier to debug from the browser, use
Expand Down
5 changes: 5 additions & 0 deletions src/Metajelo/UI.purs
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,11 @@ getOpt ::
Opt.Option suboption
getOpt = Opt.getWithDefault Opt.empty


-- Used for updating an option in the view-model, typically to inject data
-- from higher up in the component tree to lower down.
-- Type is something like, x? and y? need Cons/Lack constraints:
-- Sproxy a -> Opt.option (x?) -> Boolean -> Maybe (Opt.option y?)
updateDescOn sprxy anOpt descsOn = ((Opt.get sprxy anOpt)
<#> (\lo -> execState (do
get >>= Opt.maySetOptState (SProxy :: _ "descs_on") (Just descsOn)) lo
Expand Down

0 comments on commit 2585c40

Please sign in to comment.