@@ -12,16 +12,32 @@ case object Age extends MyKey[Int]("age")
1212case object Name extends MyKey [String ](" name" )
1313case object NumThings extends MyKey [Int ](" numThings" )
1414
15- val info : MapK [MyKey , cats.Id ] = /* ... */
16- val age : Option [Int ] = info.get(Age )
17- val name : Option [String ] = info.get(Name )
15+ val info : MapK [MyKey , cats.Id ] = MapK .empty[MyKey , cats.Id ]
16+ .updated(Age , 21 )
17+ .updated(Name , " Dylan" )
18+
19+ val age : Option [Int ] = info.get(Age ) // Some(21)
20+ val name : Option [String ] = info.get(Name ) // Some("Dylan")
21+ val numThings : Option [Int ] = info.get(NumThings ) // None
22+ ```
23+
24+ # Install
25+
26+ In SBT:
27+
28+ ``` scala
29+ resolvers += " GitHub Package Registry (codedx)" at " https://maven.pkg.github.com/codedx/_"
30+ libraryDependencies += " com.codedx" %% " mapk" % " 1.0.0
1831```
1932
33+ Note that if you are using the `sbt-github-packages` plugin, you can replace the `resolvers` line with
34+ `resolvers += Resolver.githubPackages(" codedx " )`
35+
2036# Developing
2137
22- I'm in the middle of trying to set this project up to be published via Github Packages .
23- As such, I'm using the [ ` sbt-github-packages ` ] ( https://github.com/djspiewak/sbt-github-packages ) SBT Plugin.
24- This plugin requires some extra configuration in the form of a ` GITHUB_TOKEN ` environment variable.
38+ This project uses SBT, plus the [`sbt-github-packages`](https://github.com/djspiewak/sbt-github-packages) Plugin for publishing packages to Github.
39+
40+ The packaging plugin requires some extra configuration in the form of a `GITHUB_TOKEN` environment variable.
2541Failing to set this seems to cause SBT/IntelliJ to freak out; IntelliJ won't import the project, and SBT's `update` seems to fail.
2642As long as you provide a token, everything seems to be ok.
2743That said, I'm not sure what would happen if you aren't part of the `codedx` organization.
0 commit comments