As you can see from the version flagged as alpha
, this project is a work in progress. It might not even be working if you download right now. Regardless, feel free to clone the repo and give it a spin; feedback is always very welcome!
Also, in retrospective, I think I overdid a bit on the types. :p~
The gutenpress repo is a monorepo using lerna and yarn workspaces.
It's divided into two main sections:
This is where the packages that represent standalone examples live. We want to add as varied examples as we can think of, which different setups -- with express, without express, with TS, with no TS, as part of a bigger app, as a standalone thing, as a lambda, exporting mappersmith client typings -- the limit is your imagination. None of these packages will be published for obvious reasons. They also serve as playground.
Here is where our gutenpress packages live. Each folder here with a name X
will be published as @gutenpress/X
.
We want to have an adaptor structure. That is, we have a very lean core, and we build functionality on top of it to adapt it to different use cases. These adaptors serve a lot as opt-in features.
After cloning the PR, you should be able to install everything you need by running yarn
at the top level.
We use tsdx to eliminate most of the hassle of building and setting up our packages. To run the linter in all packages, run:
yarn lerna run lint --stream --parallel
We use tsd to verify our typings are sound. To run the type test in all packages, run:
yarn lerna run test:types --stream --parallel
We currently have tests only for our helpers package, and we're aware this is not ideal. To run unit tests on this specific package, run:
yarn lerna run test --scope @gutenpress/helpers
To run the examples, you can cd
into it and then start with yarn dev
, for example:
cd packages/examples/express-ts
yarn dev
curl localhost:3000/express
For now, feel free to navigate around the example to get a grasp on how it works.
TBD