Creating distributable business logic
In this section, we're going to clone our Amazhop website into the web/
folder inside this new monorepo. Once it's done, we'll move on to extract the store and models we created in previous chapters to a new module called @amazhop/logic
, and finally, we'll reimplement these models and the store through this package.
To get started with this section, we must start by cloning or copying the Amazhop website we implemented in previous chapters. To make things easier, you can just use this script:
cd packages/web/ npx degit "PacktPublishing/Redux-Made-Easy-with-Rematch/packages/chapter-10"
This script will basically move our current directory to the web/
folder. Once we're in, we'll use the degit tool that we used in previous chapters to clone Chapter 10, Rewrite a Full Code Base from JavaScript to TypeScript code.
Now, we can move on to the logic/
folder where we're going to set up the Tsdx tool...