-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I'm going to spend some time working on sharing code between the web and the api side.
Opening this issue to track the progress
This is what needs to work:
-
yarn cedar g package <name>- Updates the root package.json file (feat(cca): Use modern workspace config #751 was a prerequisite for this)
- Writes generic tsconfig, package.json, etc files for a package
- Runs
yarn installto let yarn know about the new package - Runs
yarn buildto make it possible to start using the package right away- Update this to leverage
yarn cedar build <packageName>when possible
- Update this to leverage
- When running
yarn cedar devboth the web and api sides can import and use the code in the package - When running
yarn cedar devHMR works for both the web and api sides - When building and then running
yarn cedar serve, both the web and api sides can import and use the code - When deploying, the shared code is properly built on the deploy provider's side
- Docker
- Serverless (i.e. Netlify)
- Baremetal
- Unit testing works
- api code that uses shared code
- web code that uses shared code
- tests specifically for the shared code only
-
yarn cedar upgradealso updates packages with the new version of Cedar packages -
yarn cedar dev,yarn cedar testand other cli commands works inside package directories - It's possible to tweak the templates used for new packages (chore(cli): Refactor template handling in generators #761 and feat(cli): Custom script templates #813 were prerequisites for this)
- git should ignore tsbuildinfo files
- Update templates'
.gitignorefiles - Make the package generator update
.gitignoreif needed
- Update templates'
- Document the new shared code feature
- General "shared code" docs
- Cedar CLI docs
- Update
yarn cedar build- To build all packages (in addition to web and api) when run without arguments
- To allow passing a package name to build only that package
matspid
Metadata
Metadata
Assignees
Labels
No labels