miraya-defined-types
v2.0.26
Published
Geteilte TypeScript-Typdefinitionen für Front- und Backend.
Readme
📝 Miraya Type Definition
This Repository is used to share the Typescript DTOs and schemas between Front- and Backend
➕ Add Type
- Create File in
./srcDirectory - Import File in index.ts with
export * from "./src/<object>.dto";
📦 Release
- Update Changelog
- Update Compatibility Table below
- Do Final Commit
- Update Version in NPM Package.json by
- manually edit the
package.json - Patch =
npm version patch - Minor =
npm version minor - Major =
npm version major
- Upload your Release by
npm run publish
📊 Versioning
Always make shure to use fixed Version of the types in Front- and Backend.
Compatibility Table
| Type Version | Frontend Version | Backend Version | | :----------: | :--------------: | :-------------: | | ✅2.0.7 | ✅ 2.0.0 | ✅ 2.0.4 |
✨ Command Overview
| Command | Description |
| ----------------------- | ------------------------------------------------------------------ |
| npm run build | Creates Input File |
| npm run publish | Creates Input File & Publish NPM |
| npm run build:backend | Build Dirty for backend |
| npm run build:web | Build Dirty for web |
| npm run watch:backend | Watch for changes and Build Dirty for backend |
| npm run watch:web | Watch for changes and Build Dirty for web |
| npm run git:clean | Checks for existing Online Branches and deletes local if not exist |
💩 Build Dirty
This process was made to make development easier and to share the types between backend and frontend during development. It manually copies the files to node_modules as npm would do during an update. You can even watch for changes and let nodemon do this automatically every time you change something.
Requirements
- The
miraya-typesrepository must be in the same directory asmiraya-backendandmiraya-web.
.
├── miraya-backend/
├── miraya-types/
├── miraya-web/
.Caution
- Intended for development purposes and easy handling only
- This bypasses all processes of the NPM update mechanism
- NPM install will overwrite everything again with the version specified in the package
