Because I want to have a simple example with RxJS and SOLID where I'm able to learn new topics :)
trait
percent
- Node.js (>= 16) is installed
- yarn or npm is installed
- run
yarn install
- run
yarn start
- Change version in the
package.json
. - Merge all changes to the master.
- Refresh master locally.
git pull origin main
- Create git tag.
git tag -a vX.X.X -m "What was done"
git push --tags
- Run
yarn deploy
. - Wait... wait...
- Go to the
https://ndv66.github.io/character-maker/
- See your changes :)
A place where all models (include model and lang managers) are initialized.
Files with all defaults names, configurations etc.
Files with translations.
All models for store and manipulate any kind of data.
All basics models for store and manipulate any kind of data.
These models can be simple or more advanced.
Dedicated model for every logical part of the page
Application context (global settings and data - should be available in the whole app)
All app themes (light, dark) variables and basic plain CSS (like @font-face).
All helpers, tools etc.
All more important or global types in the application.
All interfaces for models
All views of the applications.
All basic elements with ots styles, like buttons, inputs etc.
All main elements of the main page.
All unit tests are welcome here :)
Connections between described above elements are showed here:
- Prepare interface for this model and place it inside
/types/interfaces
(and export this interface).
- interface name should start with "I", for example:
IAppTheme
. - file should have the same name as this interface.
- Add this new interface to the
index.js
inside/types/interfaces
(useexport * from './INewInterface'
). - Decide which type of model should be your and select a correct folder (
/models/context
,/models/pureModel
or/models/viewModel
).
- class name should be name of the implemented interface, but without "I" and with "Model" word at the end, for example:
AppThemeModel
fromIAppTheme
interface name. - file should have the same name as this model (class).
- Implement your new model (and implements its interface) and export it.
- Add this new model to the
index.js
inside/model/<type>
(useexport * from './INewInterface'
). - Create instance of your model in the
/context/manager.ts
file - Add this instance to the
MODELS
in the/context/manager.ts
file (if necessary) - Prepare unit tests for you model.
In the project directory, you can run:
-
yarn start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser. -
yarn test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information. -
yarn build
Builds the app for production to thebuild
folder.
It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.
The app is ready to be deployed! -
yarn deploy
Deploy the app for production using gh-pages module.
TODO
- turn on/off (UI) traits impact