We create a directory for our package. Since we want to invoke our interpreter as #lang jsonic, we’ll call our package directory jsonic. We can create this directory anywhere convenient on the filesystem.
Then we use Racket’s command-line program raco to install our (still empty) package. In a terminal window, we cd into our new jsonic directory and do raco pkg install:
cd path/to/jsonic raco pkg install
12
> cd path/to/jsonic
> raco pkg install
This will trigger a flurry of status messages along these lines:
Linking current directory as a package raco setup: version: 8.15.0.8 raco setup: platform: x86_64-macosx [3m] raco setup: installation name: development raco setup: variants: 3m ··· raco setup: --- building documentation --- raco setup: --- installing collections --- raco setup: --- post-installing collections --- >
1 2 3 4 5 6 7 8 910
Linking current directory as a package
raco setup: version: 8.15.0.8
raco setup: platform: x86_64-macosx [3m]
raco setup: installation name: development
raco setup: variants: 3m
···
raco setup: --- building documentation ---
raco setup: --- installing collections ---
raco setup: --- post-installing collections ---
>
That’s it. We now have a jsonic directory for our project, installed so that Racket recognizes it as a package. This means that if we invoke #lang jsonic, or refer to a module like (require jsonic/reader), Racket will know where to find it.