!!! Attention: Please make sure to use pnpm
to install dependencies and build
the project. This is because some issues in the key component monaco-editor
,
such as NPE (Null Pointer Exception) and Array Index Out of Bound, have only
been fixed downstream (in the patches
directory).
- Node.js (version 18.x or higher recommended)
- pnpm (for managing dependencies and building the project)
You can install pnpm
globally using npm:
npm install -g pnpm
Install Dependencies
pnpm install
Note: Using
pnpm
ensures that the patched dependencies are correctly applied.
Start the development server with hot-reloading enabled:
pnpm run serve
- The application will be accessible at
http://localhost:3000
by default. - The development server supports hot module replacement (HMR) for a smooth development experience.
Ensure your code adheres to the project's coding standards:
pnpm run lint
- This command will analyze your code and automatically fix linting issues where possible.
- It utilizes ESLint and Prettier for maintaining code quality and formatting.
-
Compile and Minify the Project
pnpm run build
- This will generate optimized and minified files in the
dist
directory, ready for deployment.
- This will generate optimized and minified files in the
-
Preview the Production Build
- To serve the production build locally, you can use a static server like
serve
:pnpm install -g serve serve -s dist
- Navigate to the provided URL (usually
http://localhost:5000
) to view the production build.
- To serve the production build locally, you can use a static server like
- Static Hosting: The contents of the
dist
directory can be deployed to any static hosting service such as Nginx, Netlify, Vercel, GitHub Pages, or your own server.
Follow the steps below to integrate a new conflict resolution algorithm into the MergeBot platform:
-
Add API Endpoints
- Create API Module: Add the corresponding API to the
src/api/
directory. - Configure Base URL: Set the base URL for the new API in
src/api/config.ts
.
- Create API Module: Add the corresponding API to the
-
Update Triggers and Store
- Add Trigger: Incorporate the corresponding trigger in
src/views/DiffResolution.vue
. - Store Data: Store the retrieved data in the Vuex store located in
src/store/
.
- Add Trigger: Incorporate the corresponding trigger in
-
Handle Resolution Levels
-
Block Level Resolution:
- Modify Hover Contents: Update the
extractHoverContents
function insrc/utils/ui.js
to add the necessary hover content. - Add Context Menu Actions: Modify the
useAddContextMenuItems
function insrc/utils/ui.js
to include new context menu actions related to block-level resolution.
- Modify Hover Contents: Update the
-
Patch Level Resolution:
- Add Patch Interactions: Update the
addPatchInteractions
function insrc/utils/ui.js
to handle patch-level interactions. - Update Context Menu for Patches: Modify the
useAddContextMenuItemsToModified
function insrc/utils/ui.js
to add context menu actions for patch-level resolution.
- Add Patch Interactions: Update the
-
-
Finalize Integration
- Verify Changes: Ensure that all modifications are correctly implemented and that there are no conflicts or errors.
- Use the New Algorithm: You can now utilize the newly integrated conflict resolution algorithm within the MergeBot frontend.
Note: After completing the integration, it is recommended to run the application and perform thorough testing to ensure that the new conflict resolution algorithm functions as expected without introducing any issues.
Refer to the Vue CLI Configuration Reference for detailed information on customizing your Vue project.