Front-end item packaging method and device, electronic equipment, storage medium and program product

By obtaining the packaging information of the front-end project and comparing the branch names, the latest version can be obtained for batch packaging, which solves the problem of low packaging efficiency of front-end projects and realizes an efficient multi-project packaging process.

CN118939309APending Publication Date: 2024-11-12CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411068149.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

After the separation of front-end and back-end, existing technologies suffer from low efficiency and high labor costs in the packaging process of front-end modular projects, especially when developing or compiling multiple micro-front-end projects at the same time, which requires a lot of repetitive work.

Method used

By obtaining packaging information for multiple front-end projects, comparing the branch names of each project, obtaining the latest version, and executing the packaging task, multiple front-end projects can be packaged in batches, reducing repetitive work.

Benefits of technology

It improves the efficiency of front-end project packaging, saves labor costs, and enhances the automation and efficiency of the packaging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939309A_ABST
    Figure CN118939309A_ABST
Patent Text Reader

Abstract

The invention provides a front-end item packaging method and device, electronic equipment, a storage medium and a program product. The method comprises the following steps: obtaining packaging information of a plurality of front-end items, wherein the packaging information comprises paths of the front-end items and branch names needing to be packaged in the front-end items; the packaging information of each front-end item is traversed, the branch name needing to be packaged in each front-end item is compared with the branch name of the current front-end item, a comparison result is obtained, and the comparison result is used for indicating whether the branch name needing to be packaged in each front-end item is consistent with the branch name of the current front-end item or not; according to the comparison result, obtaining the latest version of the branch needing to be packaged in each front-end item; and executing a packaging task on the latest version of the branch needing to be packaged in each front-end project to obtain a packaged file of each front-end project until packaged files of multiple front-end projects are obtained. According to the method, the technical effect of improving the front-end item packaging efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a front-end project packaging method, device, electronic device, storage medium and program product. Background Art

[0002] With the rapid development of mobile application technology, companies will provide software development kits (SDKs) to their own and third-party developers in order to promote their own products and services. SDKs integrate various development services and can provide development functions for application (Application, App) developers. Generally, when the SDK is developed, the packaged SDK will be released to the developer platform for download and subsequent integration.

[0003] At present, when packaging the SDK, considering that some developers do not need all the functions of the SDK, it is usually necessary to pull branches for specific developers, tailor the functions of the SDK, and manually compile the source code in the local environment to generate library files. After the separation of the front-end and back-end, the front-end modularization has been continuously developed, and most front-end modular projects rely on webpack (static module packaging tool). The conventional packaging process is to package each project independently. When developing or compiling and deploying multiple micro-front-end projects at the same time, a lot of repetitive work is required, which consumes labor costs and has the technical problem of low efficiency in front-end project packaging. Summary of the invention

[0004] The present application provides a front-end project packaging method, device, electronic device, storage medium and program product to solve the technical problem of low efficiency of front-end project packaging.

[0005] In a first aspect, the present application provides a front-end project packaging method, comprising:

[0006] Get the packaging information of multiple front-end projects, including the path of the front-end project and the name of the branch to be packaged in the front-end project;

[0007] Traverse the packaging information of each front-end project, compare the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtain a comparison result. The comparison result is used to indicate whether the branch name to be packaged in each front-end project is consistent with the branch name of the current front-end project;

[0008] According to the comparison results, obtain the latest version of the branch to be packaged in each front-end project;

[0009] Perform the packaging task on the latest version of the branch to be packaged in each front-end project to obtain the packaging file of each front-end project until the packaging files of multiple front-end projects are obtained.

[0010] Optionally, the above method obtains the packaging information of multiple front-end projects, including:

[0011] In response to an operation on the project editing window, a project packaging window is displayed above the operation window;

[0012] In response to a project adding operation acting on a project packaging window, obtaining packaging information of a plurality of front-end projects input by a user; or

[0013] In response to a batch import operation acting on a project packaging window, a pre-stored packaging configuration file is obtained locally, where the packaging configuration file includes packaging information of multiple front-end projects.

[0014] Optionally, the above method further comprises:

[0015] Check the format of the package configuration file;

[0016] If the format of the path of each front-end project and the branch name to be packaged in the packaging configuration file is correct, compare the number of paths of the front-end project in the packaging configuration file with the number of branches of the front-end project;

[0017] If the number of paths is consistent with the number of branches, execute the step of traversing the packaging information of each front-end project, comparing the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtaining the comparison result;

[0018] If the number of paths is inconsistent with the number of branches, a first prompt message is sent, and the first prompt message is used to prompt the user to check the packaging configuration file.

[0019] Optionally, the above method obtains the latest version of the branch to be packaged in each front-end project based on the comparison results, including:

[0020] If the comparison result indicates that the branch name to be packaged in the first front-end project is consistent with the branch name of the current front-end project, the latest version of the branch of the current front-end project is obtained from the server as the latest version of the branch to be packaged in the first front-end project, where the first front-end project is any one of the multiple front-end projects;

[0021] If the comparison result indicates that the branch name to be packaged in the first front-end project is inconsistent with the branch name of the current front-end project, the branch of the current front-end project is switched to the branch to be packaged in the first front-end project, and the latest version of the branch to be packaged in the first front-end project is obtained from the server.

[0022] Optionally, in the above method, the branch of the current front-end project is switched to before the branch to be packaged in the first front-end project, and the method includes:

[0023] Determine whether there is a modification record for the file content under the current front-end project branch;

[0024] If there is a modification record of the file content under the current front-end project branch, confirm whether to cache the modified content under the current front-end project branch in the preset storage space; after determining to cache the modified content under the current front-end project branch, execute the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project;

[0025] If there is no modification record of the file content under the current front-end project branch, execute the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project.

[0026] Optionally, the above method further comprises:

[0027] If it is determined that the modified content under the current front-end project branch is not cached in the preset storage space, a second prompt message is sent, and the second prompt message is used to prompt the user whether to cache the modified content under the current front-end project branch in the preset storage space.

[0028] Optionally, the above method further comprises:

[0029] Traverse and execute the packaging tasks of the latest versions of the branches to be packaged in multiple front-end projects. If the packaging task fails for the latest version of the branch to be packaged in the first front-end project, display a prompt window to indicate the path of the front-end project where the packaging task failed, the name of the front-end project and the reason for the failure;

[0030] In response to the confirmation operation on the prompt window, the packaging task of the latest version of the branch to be packaged in the next front-end project after the first front-end project in the project packaging window continues to be executed.

[0031] Optionally, the above method further comprises:

[0032] After traversing and executing the packaging tasks of the latest versions of branches that need to be packaged in multiple front-end projects, a third prompt information is displayed in the project editing window. The third prompt information is used to indicate the front-end project paths, front-end project names and reasons for failure of one or more front-end project executions that failed to execute the packaging tasks.

[0033] In a second aspect, the present application provides a front-end project packaging device, comprising:

[0034] The first acquisition module is used to obtain the packaging information of multiple front-end projects, where the packaging information includes the path of the front-end project and the name of the branch to be packaged in the front-end project;

[0035] The comparison module is used to traverse the packaging information of each front-end project, compare the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtain the comparison result. The comparison result is used to indicate whether the branch name to be packaged in each front-end project is consistent with the branch name of the current front-end project;

[0036] The second acquisition module is used to obtain the latest version of the branch to be packaged in each front-end project according to the comparison results;

[0037] The packaging module is used to perform packaging tasks on the latest version of the branch to be packaged in each front-end project, and obtain the packaging files of each front-end project until the packaging files of multiple front-end projects are obtained.

[0038] In a third aspect, the present application provides an electronic device, including:

[0039] a processor, and a memory communicatively coupled to the processor;

[0040] Memory stores computer-executable instructions;

[0041] The processor executes the computer execution instructions stored in the memory, so that the electronic device executes any one of the front-end project packaging methods in the first aspect.

[0042] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement a front-end project packaging method as described in any one of the first aspects.

[0043] In a fifth aspect, the present application provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the front-end project packaging method of any one of the first aspects.

[0044] The front-end project packaging method, device, electronic device, storage medium and program product provided by the present application obtain the packaging information of multiple front-end projects, traverse the packaging information of each front-end project, compare the branch name to be packaged in each front-end project with the branch name of the current front-end project, obtain the comparison result, and then obtain the latest version of the branch to be packaged in each front-end project from the server according to the comparison result, perform the packaging task on the latest version of the branch to be packaged in each front-end project, obtain the packaging file of each front-end project, and finally obtain the packaging files of multiple front-end projects. This method can batch package multiple front-end projects without a lot of repetitive work, saving labor costs, and achieving the technical effect of improving the efficiency of front-end project packaging. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0046] Figure 1 A schematic diagram of a process for packaging a front-end project provided in an embodiment of the present application;

[0047] Figure 2 A schematic diagram of changes in the visual operation interface provided in an embodiment of the present application;

[0048] Figure 3 A schematic diagram of a process for packaging a front-end project provided in an embodiment of the present application;

[0049] Figure 4 A schematic diagram of the structure of a front-end project packaging device provided in an embodiment of the present application;

[0050] Figure 5 A hardware structure diagram of an electronic device provided in an embodiment of the present application.

[0051] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0053] First, the terms involved in this application are explained:

[0054] Front-end Project: The full English name is Front-end Project, which refers to a project that focuses on developing user interface and user experience. It usually involves creating and optimizing the part where users interact with websites or applications, ensuring that users can use websites or applications conveniently and intuitively, and providing an intuitive, responsive and beautiful user experience.

[0055] Front-end project packaging: refers to the integration, optimization and compression of various resources used in the front-end development process to facilitate efficient loading and running in the production environment. The main purpose of front-end project packaging is to increase the loading speed of web pages, reduce the size of resources, optimize performance and simplify the deployment process.

[0056] Branch: In the development process of front-end projects, version control systems (such as Git) are usually used to manage codes and track changes in source code during software development. It allows multiple developers to collaborate on projects, record each code change, and be able to trace back to previous versions when needed. Branches allow developers to perform independent development, testing, and integration in different workflows without affecting the stability of the main branch.

[0057] In the prior art, after the separation of the front-end and back-end, the front-end modularization has been continuously developed, and most of the front-end modularization projects rely on webpack (static module packaging tool). The conventional packaging process is to package each project independently. When developing or compiling and deploying multiple micro-front-end projects at the same time, a lot of repetitive work is required, which consumes labor costs and has low efficiency in front-end project packaging.

[0058] The front-end project packaging method, device, electronic device, storage medium and program product provided by the present application need to design a batch packaging method for multiple front-end projects in order to improve the packaging efficiency of front-end projects, so as to solve the technical problem of low packaging efficiency of front-end projects. The method obtains the packaging information of multiple front-end projects, traverses the packaging information of each front-end project, compares the branch name to be packaged in each front-end project with the branch name of the current front-end project, obtains the comparison result, and then obtains the latest version of the branch to be packaged in each front-end project from the server according to the comparison result, performs the packaging task on the latest version of the branch to be packaged in each front-end project, obtains the packaging file of each front-end project, and obtains the packaging file of multiple front-end projects until the packaging files of multiple front-end projects are obtained. The method can batch package multiple front-end projects without a lot of repetitive work, saves labor costs, and achieves the technical effect of improving the packaging efficiency of front-end projects.

[0059] The front-end project packaging method provided in this application is intended to solve the above technical problems of the prior art.

[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0061] Figure 1 The flowchart of the front-end project packaging method provided in the embodiment of the present application is shown in FIG. The execution subject of the front-end project packaging method provided in the present embodiment can be a front-end project packaging system, which can be a server, a computer, a mobile device, etc. Figure 1 As shown, the front-end project packaging method provided in this embodiment includes:

[0062] S101. Obtain packaging information of multiple front-end projects, where the packaging information includes the path of the front-end project and the name of the branch to be packaged in the front-end project.

[0063] Among them, the path of the front-end project is the specific location where the front-end project files are stored in the file system. It is a directory path that contains all the source code, configuration files, static resources, etc. of the front-end project.

[0064] The branch name to be packaged in the front-end project refers to the name of the branch where the code used is located when building and packaging the project. A branch of a front-end project is equivalent to a version of the front-end project. If a front-end project has multiple versions, there are also multiple branches, and different branches are named differently.

[0065] In an embodiment of the present application, the front-end project packaging system can obtain packaging information of multiple front-end projects by having the user batch input packaging information of multiple front-end projects or importing user-defined packaging configuration files from the local.

[0066] In some embodiments, the packaging information includes the path of the front-end project, the branch name to be packaged in the front-end project, and the packaging command of the front-end project. There is an encapsulated packaging command in the front-end project packaging system as a common or default packaging command. When some special front-end project users determine that they need to use other packaging commands for packaging, they can continue to add the packaging command of the front-end project through the project addition operation after adding the path of the front-end project and the branch name to be packaged. The project addition operation will cause a pop-up window to enter the packaging information, which is a pop-up window for entering the path of the front-end project, a pop-up window for entering the branch name to be packaged, and a pop-up window for entering the packaging command of the front-end project. The user performs a project addition operation once, and enters the packaging information of a front-end project. When the user does not enter the packaging command in the pop-up window for entering the packaging command of the front-end project, the system defaults to using the packaging command encapsulated in the system for packaging.

[0067] Among them, in the embodiment of the present application, the method for obtaining packaging information of multiple front-end projects may also include:

[0068] In response to an operation on the project editing window, a project packaging window is displayed above the project editing window;

[0069] In response to a project adding operation acting on a project packaging window, obtaining packaging information of a plurality of front-end projects input by a user; or

[0070] In response to a batch import operation acting on a project packaging window, a pre-stored packaging configuration file is obtained locally, where the packaging configuration file includes packaging information of multiple front-end projects.

[0071] In the embodiment of the present application, the project editing window refers to the window in which the user edits the code of the current front-end project. The front-end project packaging system is run in the project editing window, and the project packaging window appears above the project editing window. The project packaging window is a visual operation interface of the front-end project packaging system.

[0072] Combine the following Figure 2 A method for obtaining packaging information of multiple front-end projects input by a user in response to a project adding operation acting on a project packaging window is introduced.

[0073] For example, Figure 2 This is a schematic diagram of the changes in the visual operation interface provided in the embodiment of the present application. Figure 2 As shown in the interface 201 in the figure, the interface 201 is a project packaging window, and the interface 201 also displays multiple controls and a display interface 2015 for front-end project packaging information, wherein the multiple controls include an add project control 2011, a compare branch and package control 2012, a batch import package project control 2013, and an export package project configuration control 2014. The display interface 2015 for front-end project packaging information is used to display the packaging information of multiple front-end projects obtained by clicking the project adding operation of the add project control 20211 or the batch import operation of the batch import package project configuration control 2013.

[0074] In an embodiment of the present application, a user can manually add packaging information of one or more front-end projects by clicking the Add Project control 2011, or can import packaging configuration files pre-stored locally by clicking the Batch Import Packaging Project Configuration control 2013; the front-end project packaging system can obtain packaging information of multiple front-end projects in response to a project adding operation performed by the user on the Add Project control 2011 in the project packaging window 201, or in response to a batch import operation performed by the user on the Batch Import Packaging Project Configuration control 2013 in the project packaging window 201.

[0075] For example, Figure 2 As shown in the interface 201 in the figure, the user clicks the add project control 2011, and the system responds to the project adding operation of the add project control 2011 by the user in the project packaging window 201, and displays the input interface 202 of the front-end project path above the project packaging window 201. The input interface 202 of the front-end project path displays an input box 2021 for entering the front-end project path, as well as an OK control 2022 and a Cancel control 2023. The OK control 2022 is a confirmation operation after the user completes the input of the front-end project path, which is used to trigger the next action, and the Cancel control 2023 is a cancel operation of the user inputting the front-end project path, which is used to exit the current action and return to the previous action.

[0076] like Figure 2 As shown in the input interface 202 of the front-end project path, the user enters the path of the front-end project 1 in the input box 2021 for entering the front-end project path. After the input is completed, the user clicks the OK control 2022. The system responds to the user's confirmation operation on the OK control 2022 in the input interface 202 for the front-end project path, obtains the path information of the front-end project 1, triggers the input action of the packaging branch, and displays the input interface 203 of the packaging branch corresponding to the front-end project above the project packaging window 201. The input interface 203 of the packaging branch corresponding to the front-end project displays an input box 2031 for entering the name of the packaging branch corresponding to the front-end project, as well as an OK control 2032 and a Cancel control 2033. The OK control 2032 is the confirmation operation after the user completes the input of the packaging branch name corresponding to the front-end project, which is used to trigger the next action. The Cancel control 2033 is the cancellation operation of the user's input of the packaging branch name corresponding to the front-end project, which is used to exit the current action and return to the previous action.

[0077] like Figure 2 As shown in the input interface 203 of the packaging branch corresponding to the front-end project in the input box 2031 of "Please enter the packaging branch name corresponding to the front-end project", the user enters the branch name 1 to be packaged in the front-end project 1. After the input is completed, the user clicks the OK control 2032. In response to the user's confirmation operation on the OK control 2032 in the input interface 203 of the packaging branch corresponding to the front-end project, the system obtains the branch name 1 to be packaged in the front-end project 1, triggers the input action of the packaging command, and displays the input interface 204 of the packaging command corresponding to the packaging branch above the project packaging window 201. The input interface 204 of the packaging command corresponding to the packaging branch displays an input box 2041 of "Please enter the packaging command corresponding to the packaging branch", as well as an OK control 2042 and a Cancel control 2043. The OK control 2042 is the confirmation operation after the user completes the input of the packaging command corresponding to the packaging branch, which is used to complete the current input action. The Cancel control 2043 is the cancellation operation of the packaging command corresponding to the packaging branch input by the user, which is used to exit the current action and return to the previous step.

[0078] like Figure 2 As shown in the input interface 204 of the packaging command corresponding to the packaging branch, the user enters the packaging command 1 of the branch name 1 to be packaged in the input box 2041 of "Please enter the packaging command corresponding to the packaging branch". After the input is completed, the user clicks the OK control 2042. The system responds to the user's confirmation operation on the OK control 2042 in the input interface 204 of the packaging command corresponding to the packaging branch, obtains the packaging command 1 of the branch name 1 to be packaged, and displays the packaging information entered by the user in the display interface 2015 of the front-end project packaging information of the project packaging window 201.

[0079] Among them, in the embodiment of the present application, the method for obtaining packaging information of multiple front-end projects may also include:

[0080] Check the format of the package configuration file;

[0081] If the format of the path of each front-end project and the branch name to be packaged in the packaging configuration file is correct, compare the number of paths of the front-end project in the packaging configuration file with the number of branches of the front-end project;

[0082] If the number of paths is consistent with the number of branches, execute the step of traversing the packaging information of each front-end project, comparing the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtaining the comparison result;

[0083] If the number of paths is inconsistent with the number of branches, a first prompt message is sent, and the first prompt message is used to prompt the user to check the packaging configuration file.

[0084] In an embodiment of the present application, in response to a batch import operation acting on a project packaging window, after obtaining a pre-stored packaging configuration file from the local computer, it is necessary to check whether the packaging configuration file complies with the specification, so that the front-end project packaging system can read the packaging information in the packaging configuration file. First, it is necessary to check the file format of the packaging configuration file, which is determined according to the file format that can be read by the front-end project packaging system, and check whether the format of each front-end project path and the branch name to be packaged in the packaging configuration file is correct; then compare whether the number of paths of the front-end project in the packaging configuration file is consistent with the number of branches of the front-end project.

[0085] If the file format and packaging information format of the packaging configuration file are correct, and the number of comparison paths is consistent with the number of branches, the step of traversing the packaging information of each front-end project is executed, and the branch name to be packaged in each front-end project is compared with the branch name of the current front-end project to obtain the comparison result; if the file format and packaging information format of the packaging configuration file are incorrect or the number of comparison paths is inconsistent with the number of branches, the first prompt information is sent, and a prompt window pops up in the project packaging window to prompt the user to check the packaging configuration file.

[0086] like Figure 2As shown in the interface 201 in the figure, the user clicks the batch import package project configuration control 2013 to import the package configuration file pre-stored locally. The front-end project packaging system responds to the batch import operation of the user acting on the batch import package project configuration control 2013 in the project packaging window 201, obtains the packaging information of multiple front-end projects, and checks the format and quantity of the packaging information in the packaging configuration file. If the file format of the packaging configuration file and the packaging information format are incorrect or the number of comparison paths and the number of branches are inconsistent, the first prompt information is sent, and the project packaging window pops up a prompt window 205 of the first prompt information to prompt the user to check the packaging configuration file. The prompt window 205 displays the first prompt information 2051 and the confirmation control 2052. The first prompt information 2051 includes a prompt file error and a prompt error reason. The file error will prompt the path and file name of the error file 1, and the error reason will prompt the error reason 1. The confirmation control 2052 is a confirmation operation after the user views the first prompt information in the prompt window 205. In response to the user's confirmation operation on the confirmation control 2052 in the prompt window 205 of the first prompt information, the system ends the batch import operation, and performs the batch import operation again after the user checks the packaged configuration file.

[0087] S102. Traverse the packaging information of each front-end project, compare the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtain a comparison result. The comparison result is used to indicate whether the branch name to be packaged in each front-end project is consistent with the branch name of the current front-end project.

[0088] In the embodiments of the present application, Figure 2 As shown in the interface 201, the user clicks on the compare branches and package control 2012, and the front-end project packaging system responds to the compare branches and package operation in the project packaging window, and starts to traverse the packaging information of each front-end project, and compares the branch name to be packaged in each front-end project with the branch name of the current front-end project to obtain the comparison result. If the comparison results of the branch names are consistent, it means that the branch of the current front-end project is the branch that needs to be packaged, and subsequent packaging operations can be performed based on the branch where the current project is located; if the comparison results of the branch names are inconsistent, it means that the branch of the current front-end project is not the branch that needs to be packaged, and it is necessary to find the branch that needs to be packaged in the front-end project according to the branch name that needs to be packaged in each front-end project, and switch the branch of the current front-end project to the branch that needs to be packaged in the front-end project, and then perform subsequent packaging operations.

[0089] S103. According to the comparison result, the latest version of the branch to be packaged in each front-end project is obtained.

[0090] Among them, the latest version of the branch to be packaged in each front-end project refers to the latest version of the branch to be packaged in the front-end project in the server.

[0091] In an embodiment of the present application, the branches to be packaged in each front-end project are found according to the comparison results; then, according to the local configuration file of the project, the latest version of the branches to be packaged in each front-end project is obtained from the server. In the local configuration file of the project, there is association information between the front-end project and the server. The server may be an online website stored in a database. The association relationship between the branches to be packaged in the front-end project and the server corresponds one-to-one. The branches of the front-end project stored in the server are different versions of the front-end project uploaded by developers of different terminals. According to the local configuration file of the front-end project, the latest version of the branches to be packaged in the front-end project in the server is obtained, and the latest version in the server is synchronously merged and updated to the local front-end project, that is, the latest version of the branches to be packaged in each front-end project is obtained. For example, a developer pulls or downloads the latest version of the front-end project from the server to the local branch, and then modifies the code of the latest version of the front-end project in the local branch. The modification is completed after a period of time. Before packaging the latest version of the modified front-end project, it is necessary to execute the git pull command to pull or download the latest version of the front-end project from the server and merge it into the local branch. During the period of local modification, other developers may upload updated versions to the server. If the latest version of the front-end project is not re-pulled or downloaded from the server, a version error will occur. Therefore, in order to avoid this situation, before packaging the local front-end project, it is necessary to pull or download the latest version of the front-end project from the server and merge it into the local branch.

[0092] S104, executing a packaging task for the latest version of the branch to be packaged in each front-end project, and obtaining a packaging file for each front-end project, until packaging files of multiple front-end projects are obtained.

[0093] In an embodiment of the present application, the latest version of the branch to be packaged in each front-end project is obtained, and the packaging task is performed on the latest version of the branch to be packaged in each front-end project according to the packaging command encapsulated in the front-end project packaging system or the packaging command of the front-end project entered by the user by clicking the Add Project Control 2011, and the packaging file of each front-end project is obtained, until the packaging files of multiple front-end projects are obtained.

[0094] Among them, in the embodiment of the present application, the method of performing a packaging task on the latest version of the branch to be packaged in each front-end project to obtain a packaging file for each front-end project until the packaging files of multiple front-end projects are obtained may also include:

[0095] Traverse and execute the packaging tasks of the latest versions of the branches to be packaged in multiple front-end projects. If the packaging task fails for the latest version of the branch to be packaged in the first front-end project, display a prompt window to indicate the path of the front-end project where the packaging task failed, the name of the front-end project and the reason for the failure;

[0096] In response to the confirmation operation on the prompt window, the packaging task of the latest version of the branch to be packaged in the next front-end project after the first front-end project in the project packaging window continues to be executed.

[0097] In the embodiment of the present application, during the process of executing the packaging task for the latest version of the branch to be packaged in each front-end project, if a packaging task fails to execute, a prompt window will appear above the project packaging window. The prompt window is used to indicate the path of the front-end project that failed to execute the packaging task, the name of the front-end project and the reason for the failure. The prompt window will only prompt the execution failure information of one front-end project at a time. In the prompt window, there is a confirmation control for the user to confirm the failure of the front-end project. After clicking the confirmation control to perform the confirmation operation, the packaging task of the latest version of the branch to be packaged in the next front-end project after the first front-end project in the project packaging window will continue to be executed.

[0098] like Figure 2 As shown in the interface 201 in the figure, the user clicks the compare branches and package control 2012. The system responds to the packaging operation of the compare branches and package control 2012 performed by the user in the project packaging window 201. If the packaging task fails to be executed for the latest version of the branch to be packaged in the first front-end project, a prompt window 206 is displayed above the project packaging window 201. The prompt window 206 includes project packaging failure information 2061 and a confirmation control 2062. The project packaging failure information 2061 includes the path of the front-end project that failed to execute the packaging task, the name of the front-end project and the reason for failure. The confirmation control 2062 is a confirmation operation of the user after viewing the project packaging failure information 2061 in the prompt window 206. In response to the confirmation operation of the user in the confirmation control 2062 in the prompt window 206, the system ends the packaging action of the first front-end project that failed to execute the packaging task, and continues to execute the packaging task of the latest version of the branch to be packaged in the next front-end project after the first front-end project in the project packaging window.

[0099] Among them, in the embodiment of the present application, the method of performing a packaging task on the latest version of the branch to be packaged in each front-end project to obtain a packaging file for each front-end project until the packaging files of multiple front-end projects are obtained may also include:

[0100] After traversing and executing the packaging tasks of the latest versions of branches that need to be packaged in multiple front-end projects, a third prompt information is displayed in the project editing window. The third prompt information is used to indicate the front-end project paths, front-end project names and reasons for failure of one or more front-end project executions that failed to execute the packaging tasks.

[0101] In an embodiment of the present application, during the process of executing the packaging task for the latest version of the branch to be packaged in each front-end project, if a packaging task fails to execute, a prompt window appears above the project packaging window, and a third prompt message is displayed in the project editing window. The third prompt message is used to indicate the path of one or more front-end projects that failed to execute the packaging task, the name of the front-end project, and the reason for failure. If a front-end project fails to execute packaging, a log message of the project failure is displayed in the project editing window. When traversing and executing all packaging tasks, the log messages of the packaging failure of each front-end project are displayed one by one until all packaging tasks are traversed and executed, and all packaging failure messages are displayed. In some embodiments, the third prompt message can directly display the path of one or more front-end projects that failed to execute the packaging task, the name of the front-end project, and the reason for failure after traversing and executing all packaging tasks.

[0102] In the embodiments of the present application, Figure 2 As shown in the interface 201, after executing the packaging task for the latest version of the branch to be packaged in each front-end project and obtaining the packaging file of each front-end project, the user can click the export packaging project configuration control 2014. The system responds to the export operation of the packaging project configuration control 2014 in the project packaging window 201 by the user, and exports the packaging information of multiple front-end projects input by the user through the project adding operation of the project control. The front-end project packaging system responds to the packaging project configuration operation in the project packaging window, outputs the packaging project configuration information, updates and saves it to the local packaging configuration file for use in the next batch packaging, saving the cost of manually adding project packaging information.

[0103] The front-end project packaging method provided by the present application obtains the packaging information of multiple front-end projects, traverses the packaging information of each front-end project, compares the branch name to be packaged in each front-end project with the branch name of the current front-end project, obtains the comparison result, and then obtains the latest version of the branch to be packaged in each front-end project from the server according to the comparison result, performs the packaging task on the latest version of the branch to be packaged in each front-end project, obtains the packaging file of each front-end project, and obtains the packaging files of multiple front-end projects. This method can batch package multiple front-end projects without a lot of repetitive work, saves labor costs, and achieves the technical effect of improving the efficiency of front-end project packaging.

[0104] Figure 3The following is a flow chart of the front-end project packaging method provided in the embodiment of the present application. Figure 3 As shown in the above Figure 1 Based on the illustrated embodiment, a front-end project packaging method for obtaining the latest version of the branch to be packaged in each front-end project according to the comparison result in the above step S103 is described in detail. The method includes:

[0105] S301. If the comparison result indicates that the branch name to be packaged in the first front-end project is consistent with the branch name of the current front-end project, the latest version of the branch of the current front-end project is obtained from the server as the latest version of the branch to be packaged in the first front-end project, and the first front-end project is any one of the multiple front-end projects.

[0106] The server refers to an online storage platform associated with the front-end project, and the branches of the front-end project stored in the server are different versions of the front-end project uploaded by developers of different terminals.

[0107] In an embodiment of the present application, when the comparison result indicates that the branch name to be packaged in the first front-end project is consistent with the branch name of the current front-end project, it means that the branch to be packaged in the first front-end project is the branch of the current front-end project. According to the local configuration file of the current front-end project, a server associated with the current front-end project is found, and the latest version of the branch of the current front-end project is obtained or downloaded from the server, and merged into the branch to be packaged in the local first front-end project to obtain the latest version of the branch to be packaged in the first front-end project.

[0108] S302. If the comparison result indicates that the branch name to be packaged in the first front-end project is inconsistent with the branch name of the current front-end project, the branch of the current front-end project is switched to the branch to be packaged in the first front-end project, and the latest version of the branch to be packaged in the first front-end project is obtained from the server.

[0109] In an embodiment of the present application, when the comparison result indicates that the branch name to be packaged in the first front-end project is inconsistent with the branch name of the current front-end project, it means that the branch to be packaged in the first front-end project is not a branch of the current front-end project. According to the path information of the first front-end project, the location where the first front-end project is stored locally is found. According to the branch name to be packaged of the first front-end project, the branches of the local first front-end project are traversed to find the branches to be packaged in the local first front-end project. The branches of the current front-end project are switched to the branches to be packaged in the first front-end project. According to the local configuration file of the first front-end project, the server associated with the first front-end project is found, the latest version of the branch of the first front-end project is obtained or downloaded from the server, and merged into the branch to be packaged in the local first front-end project to obtain the latest version of the branch to be packaged in the first front-end project.

[0110] Among them, in the embodiment of the present application, the method of switching the branch of the current front-end project to the branch to be packaged in the first front-end project also includes:

[0111] Determine whether there is a modification record for the file content under the current front-end project branch;

[0112] If there is a modification record of the file content under the current front-end project branch, confirm whether to cache the modified content under the current front-end project branch in the preset storage space; after determining to cache the modified content under the current front-end project branch, execute the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project;

[0113] If there is no modification record of the file content under the current front-end project branch, execute the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project.

[0114] The preset storage space is a new storage space opened locally for caching the modified content under the current front-end project branch. In the subsequent process of switching branches or obtaining the latest version of a branch, if the modified content under the current front-end project branch is not cached in the preset storage space, code conflicts may occur and the code with modification records may be lost. Therefore, it is necessary to confirm whether the modified content under the current front-end project branch is cached in the preset storage space.

[0115] In the embodiment of the present application, the modification of the file content under the current front-end project branch is recorded locally. If the file content is modified but not saved, there is no modification record locally. Determine whether there is a modification record of the file content under the current front-end project branch by executing the corresponding command. If there is a modification record of the file content under the current front-end project branch, confirm whether the modified content under the current front-end project branch is cached or backed up in the preset storage space. If the modified content under the current front-end project branch is cached or backed up in the preset storage space, execute the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project; if there is no modification record of the file content under the current front-end project branch, it means that the file content under the current front-end project branch has not been modified, and directly execute the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project.

[0116] Among them, in the embodiment of the present application, the method of switching the branch of the current front-end project to the branch to be packaged in the first front-end project also includes:

[0117] If it is determined that the modified content under the current front-end project branch is not cached in the preset storage space, a second prompt message is sent, and the second prompt message is used to prompt the user whether to cache the modified content under the current front-end project branch in the preset storage space.

[0118] In the embodiments of the present application, Figure 2 As shown in the interface 201 in the figure, the user clicks the compare branches and package control 2012, and the system responds to the user's operation of the compare branches and package control 2012 on the project packaging window 201. After the comparison result is used to indicate that the branch name to be packaged in the first front-end project is inconsistent with the branch name of the current front-end project, and before the branch of the current front-end project is switched to the branch to be packaged in the first front-end project, if there is a modification record of the file content under the branch of the current front-end project, and the modified content under the branch of the current front-end project is not cached or backed up in the preset storage space, a prompt pop-up window 207 is displayed above the project packaging window 201. The prompt pop-up window 207 includes second prompt information 2071, a yes control and a no control. The second prompt information 2071 prompts the user whether to cache or back up the modified content under the branch of the current front-end project in the preset storage space. The yes control is a confirmation operation that the user needs to cache or back up the modified content under the branch of the current front-end project in the preset storage space, and the no control is a cancellation operation that the user does not need to cache or back up the modified content under the branch of the current front-end project in the preset storage space.

[0119] If the modified content under the current front-end project branch is meaningful to the user, the user can choose to cache it in the preset storage space. The user clicks the Yes control, and the system responds to the user's confirmation operation on the Yes control 2071 in the prompt pop-up window 207, and caches or backs up the modified content under the current front-end project branch in the preset storage space. If the caching is successful, the cache success log information is sent to the user through the cache success pop-up window 208. The cache success pop-up window 208 includes the cache success log information 2081 and the confirmation control 2082. The confirmation control 2082 is the confirmation operation after the user views the cache success log information in the cache success pop-up window 208. After the user clicks the confirmation control 2082, the system continues to execute the next switching action of switching the branch of the current front-end project to the branch to be packaged in the first front-end project; if the caching fails, the cache failure information is sent through the cache failure pop-up window 209 to prompt the user that the cache fails. The cache failure pop-up window 209 includes the cache failure reason 2091 and the confirmation control 2092. The confirmation control 2092 is the confirmation operation after the user views the cache failure reason in the cache failure pop-up window 209. After the user clicks the confirmation control 2092, the system cancels the cache action of continuing to execute the modified content under the current front-end project branch, and waits for the user to check the problems of the modified content under the current front-end project branch according to the cache failure reason 2091, and then re-executes the cache action. If the modified content under the current front-end project branch is useless to the user, the user can choose not to cache through a prompt pop-up window. The user clicks the No control, and the system responds to the user's cancel operation of the No control 2071 on the prompt pop-up window 207, and does not cache or back up the modified content under the current front-end project branch in the preset storage space.

[0120] Figure 4 This is a schematic diagram of the structure of the front-end project packaging device provided in the embodiment of the present application. The device of this embodiment can be in the form of software and / or hardware. Figure 4 As shown, a front-end project packaging device 400 provided in an embodiment of the present application includes: a first acquisition module 401, a comparison module 402, a second acquisition module 403, and a packaging module 404;

[0121] The first acquisition module 401 is used to acquire packaging information of multiple front-end projects, where the packaging information includes the path of the front-end project and the name of the branch to be packaged in the front-end project;

[0122] The comparison module 402 is used to traverse the packaging information of each front-end project, compare the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtain a comparison result, which is used to indicate whether the branch name to be packaged in each front-end project is consistent with the branch name of the current front-end project;

[0123] The second acquisition module 403 is used to acquire the latest version of the branch to be packaged in each front-end project according to the comparison result;

[0124] The packaging module 404 is used to perform a packaging task on the latest version of the branch to be packaged in each front-end project, and obtain the packaging file of each front-end project until the packaging files of multiple front-end projects are obtained.

[0125] Optionally, in the above method, the first acquisition module 401 may also be used to:

[0126] In response to an operation on the project editing window, a project packaging window is displayed above the operation window;

[0127] In response to a project adding operation acting on a project packaging window, obtaining packaging information of a plurality of front-end projects input by a user; or

[0128] In response to a batch import operation acting on a project packaging window, a pre-stored packaging configuration file is obtained locally, where the packaging configuration file includes packaging information of multiple front-end projects.

[0129] Optionally, in the above method, the first acquisition module 401 may also be used to:

[0130] Check the format of the package configuration file;

[0131] If the format of the path of each front-end project and the branch name to be packaged in the packaging configuration file is correct, compare the number of paths of the front-end project in the packaging configuration file with the number of branches of the front-end project;

[0132] If the number of paths is consistent with the number of branches, execute the step of traversing the packaging information of each front-end project, comparing the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtaining the comparison result;

[0133] If the number of paths is inconsistent with the number of branches, a first prompt message is sent, and the first prompt message is used to prompt the user to check the packaging configuration file.

[0134] Optionally, in the above method, the second acquisition module 403 may also be used to:

[0135] If the comparison result indicates that the branch name to be packaged in the first front-end project is consistent with the branch name of the current front-end project, the latest version of the branch of the current front-end project is obtained from the server as the latest version of the branch to be packaged in the first front-end project, where the first front-end project is any one of the multiple front-end projects;

[0136] If the comparison result indicates that the branch name to be packaged in the first front-end project is inconsistent with the branch name of the current front-end project, the branch of the current front-end project is switched to the branch to be packaged in the first front-end project, and the latest version of the branch to be packaged in the first front-end project is obtained from the server.

[0137] Optionally, in the above method, the second acquisition module 403 may also be used to:

[0138] Determine whether there is a modification record for the file content under the current front-end project branch;

[0139] If there is a modification record of the file content under the current front-end project branch, confirm whether to cache the modified content under the current front-end project branch in the preset storage space; after determining to cache the modified content under the current front-end project branch, execute the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project;

[0140] If there is no modification record of the file content under the current front-end project branch, execute the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project.

[0141] Optionally, in the above method, the second acquisition module 403 may also be used to:

[0142] If it is determined that the modified content under the current front-end project branch is not cached in the preset storage space, a second prompt message is sent, and the second prompt message is used to prompt the user whether to cache the modified content under the current front-end project branch in the preset storage space.

[0143] Optionally, in the above method, the packaging module 404 may also be used to:

[0144] Traverse and execute the packaging tasks of the latest versions of the branches to be packaged in multiple front-end projects. If the packaging task fails for the latest version of the branch to be packaged in the first front-end project, display a prompt window to indicate the path of the front-end project where the packaging task failed, the name of the front-end project and the reason for the failure;

[0145] In response to the confirmation operation on the prompt window, the packaging task of the latest version of the branch to be packaged in the next front-end project after the first front-end project in the project packaging window continues to be executed.

[0146] Optionally, in the above method, the packaging module 404 may also be used to:

[0147] After traversing and executing the packaging tasks of the latest versions of branches that need to be packaged in multiple front-end projects, a third prompt information is displayed in the project editing window. The third prompt information is used to indicate the front-end project paths, front-end project names and reasons for failure of one or more front-end project executions that failed to execute the packaging tasks.

[0148] Figure 5 The hardware structure diagram of the electronic device provided in the embodiment of the present application. Figure 5 As shown, the electronic device 500 provided in this embodiment includes:

[0149] At least one processor 501 and a memory 502. Optionally, the device 500 further includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.

[0150] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.

[0151] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0152] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0153] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk storage.

[0154] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0155] The embodiment of the present application also provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement a front-end project packaging method.

[0156] The embodiment of the present application also provides a computer program product, including a computer program / instruction, which implements a front-end project packaging method when executed by a processor.

[0157] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0158] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0159] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0160] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0161] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0162] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0163] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.

[0164] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0165] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0166] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0167] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A front-end project packaging method, It is characterized in that include: Obtain packaging information of multiple front-end projects, wherein the packaging information includes the path of the front-end project and the name of the branch to be packaged in the front-end project; Traversing the packaging information of each front-end project, comparing the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtaining a comparison result, wherein the comparison result is used to indicate whether the branch name to be packaged in each front-end project is consistent with the branch name of the current front-end project; According to the comparison result, the latest version of the branch to be packaged in each front-end project is obtained; A packaging task is performed on the latest version of the branch to be packaged in each front-end project to obtain a packaging file for each front-end project, until packaging files of multiple front-end projects are obtained.

2. The method according to claim 1, It is characterized in that The packaging information of multiple front-end projects is obtained, including: In response to an operation on a project editing window, displaying a project packaging window above the project editing window; In response to a project adding operation acting on the project packaging window, obtaining packaging information of the plurality of front-end projects input by a user; or In response to a batch import operation acting on the project packaging window, a pre-stored packaging configuration file is obtained locally, where the packaging configuration file includes packaging information of the plurality of front-end projects.

3. The method according to claim 2, It is characterized in that The method further comprises: Performing format check on the packaging configuration file; If the format of the path of each front-end project and the branch name to be packaged in the packaging configuration file is correct, compare the number of paths of the front-end project in the packaging configuration file with the number of branches of the front-end project; If the number of paths is consistent with the number of branches, the step of traversing the packaging information of each front-end project, comparing the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtaining the comparison result is performed; If the number of paths is inconsistent with the number of branches, a first prompt message is sent, where the first prompt message is used to prompt the user to check the packaging configuration file.

4. The method according to any one of claims 1 to 3, It is characterized in that The step of obtaining the latest version of the branch to be packaged in each front-end project according to the comparison result includes: If the comparison result indicates that the name of the branch to be packaged in the first front-end project is consistent with the name of the branch of the current front-end project, the latest version of the branch of the current front-end project is obtained from the server as the latest version of the branch to be packaged in the first front-end project, and the first front-end project is any one of the multiple front-end projects; If the comparison result indicates that the branch name to be packaged in the first front-end project is inconsistent with the branch name of the current front-end project, the branch of the current front-end project is switched to the branch to be packaged in the first front-end project, and the latest version of the branch to be packaged in the first front-end project is obtained from the server.

5. The method according to claim 4, It is characterized in that Before switching the branch of the current front-end project to the branch to be packaged in the first front-end project, the method includes: Determine whether there is a modification record for the file content under the current front-end project branch; If there is a modification record of the file content under the current front-end project branch, confirm whether to cache the modified content under the current front-end project branch in the preset storage space; after determining to cache the modified content under the current front-end project branch, execute the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project; If there is no modification record of the file content under the current front-end project branch, the step of switching the branch of the current front-end project to the branch to be packaged in the first front-end project is executed.

6. The method according to claim 5, It is characterized in that The method further comprises: If it is determined that the modified content under the current front-end project branch is not cached in the preset storage space, a second prompt message is sent, and the second prompt message is used to prompt the user whether to cache the modified content under the current front-end project branch in the preset storage space.

7. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises: Traversing and executing the packaging tasks of the latest versions of the branches to be packaged in the multiple front-end projects, if the packaging task fails to be executed for the latest version of the branch to be packaged in the first front-end project, displaying a prompt window, wherein the prompt window is used to indicate the path of the front-end project where the packaging task failed, the name of the front-end project, and the reason for the failure; In response to a confirmation operation on the prompt window, the packaging task of the latest version of the branch to be packaged in the next front-end project after the first front-end project in the project packaging window continues to be executed.

8. The method according to any one of claims 1 to 7, It is characterized in that The method further comprises: After traversing and executing the packaging tasks of the latest versions of the branches to be packaged in the multiple front-end projects, a third prompt information is displayed in the project editing window, and the third prompt information is used to indicate the front-end project paths, front-end project names and reasons for failure of one or more front-end project executions that failed to execute the packaging tasks.

9. A front-end project packaging device, It is characterized in that include: The first acquisition module is used to acquire packaging information of multiple front-end projects, where the packaging information includes the path of the front-end project and the name of the branch to be packaged in the front-end project; A comparison module, used to traverse the packaging information of each front-end project, compare the branch name to be packaged in each front-end project with the branch name of the current front-end project, and obtain a comparison result, wherein the comparison result is used to indicate whether the branch name to be packaged in each front-end project is consistent with the branch name of the current front-end project; A second acquisition module is used to acquire the latest version of the branch to be packaged in each front-end project according to the comparison result; The packaging module is used to perform packaging tasks on the latest version of the branch to be packaged in each front-end project, and obtain the packaging files of each front-end project until the packaging files of multiple front-end projects are obtained.

10. An electronic device, It is characterized in that include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the front-end project packaging method according to any one of claims 1 to 8.

11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the front-end project packaging method according to any one of claims 1 to 8.

12. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instruction is executed by a processor, the front-end project packaging method described in any one of claims 1 to 8 is implemented.