Front-end engineering construction method, device and electronic equipment
By obtaining and using existing template project files to add the seed project, the inefficiency problem caused by starting from scratch in front-end development is solved, the project development efficiency is improved and the technology stack is flexible, ensuring the unity of the project and The convenience of collaborative development.
Patent Information
- Application Number
- CN202110692838.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-22
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-06-22
AI Technical Summary
In front-end development, as the project functional requirements increase and complexity increase, each project needs to start from scratch and start from clean seed projects, resulting in a significant reduction in development efficiency and making it difficult to achieve the unity of the project directory structure and the technology stack. Flexible choice.
By obtaining the characterization information of the target seed project, querying the server for existing template projects, adding seed projects based on the template project files, generating target front-end projects, avoiding starting with clean seed projects, thereby improving development efficiency, and supporting selection based on project needs. Different technology stacks and template engineering.
It has achieved improvements in project development efficiency, ensured the unity of the project directory structure, facilitated collaborative development by developers, and avoided the problems of incorrect modification, misdeletion and code redundancy caused by early acquisition of seed project files.
Smart Images

Figure CN113419730B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of front-end development technology, and more specifically, to a front-end engineering construction method, device and electronic equipment. Background Art
[0002] Front-end development is the process of creating a front-end interface to present to users, which is used to realize the user interface interaction of Internet products. At present, front-end development has gradually become an engineering process. Many Internet teams use the scaffolding provided by front-end frameworks such as Weex, Vue and Uniapp to create front-end projects when performing front-end development-related project tasks. However, for the scaffolding provided by the front-end framework, its functional positioning is basically to create a clean seed project. However, with the increase in project functional requirements and the increase in project complexity, each project starts from scratch, that is, starting from a clean seed project, which will greatly affect the efficiency of project development. Summary of the invention
[0003] The purpose of this application is to provide a front-end engineering construction method, device and electronic equipment to solve the above-mentioned problems.
[0004] In the first aspect, the front-end engineering construction method provided by the present application includes:
[0005] Acquire first project characterization information for characterizing the target seed project, and send the first project characterization information to a server, so that the server can query at least one existing template project corresponding to the target seed project according to the first project characterization information;
[0006] receiving template project representation information of each existing template project in at least one existing template project sent by the server;
[0007] Acquire second engineering representation information selected from the received template engineering representation information, and send the second engineering representation information to the server;
[0008] Receive a template project file of a target existing template project corresponding to the second project representation information sent by the server;
[0009] The seed project file of the target seed project is appended according to the template project file to generate the target front-end project.
[0010] In the above implementation, since at least one existing template project is pre-stored in the server, the developer can independently select the target existing template project from at least one existing template project according to the project requirements, and directly append the seed project file of the target seed project according to the template project file, thereby realizing the construction of the target front-end project without starting from a clean seed project, thereby improving the project development efficiency.
[0011] In combination with the first aspect, the embodiment of the present application further provides a first optional implementation of the first aspect, where obtaining first engineering characterization information for characterizing a target seed engineering includes:
[0012] Respond to the front-end project creation instruction and generate a seed project query request;
[0013] Sending a seed project query request to a server, so that the server can respond to the seed project query request and query at least one existing seed project;
[0014] receiving seed project characterization information of each existing seed project in at least one existing seed project sent by the server;
[0015] The first project representation information selected from the received seed project representation information is obtained.
[0016] In the above implementation, since at least one existing seed project is pre-stored in the server, the developer can independently select the target seed project from at least one existing seed project according to the project requirements, thereby solving the technology selection problem. That is, the developer can select different technology stacks for the construction of the target front-end project according to the project requirements, which can achieve the unification of the project directory structure, facilitate collaborative development among developers, and further improve the project development efficiency.
[0017] In combination with the first aspect, the embodiment of the present application further provides a second optional implementation of the first aspect. After obtaining the second engineering representation information selected from the received template engineering representation information, the front-end engineering construction method further includes:
[0018] Sending the first project representation information to the server, so that the server can obtain the seed project file of the target seed project according to the first project representation information;
[0019] Receive the seed project file sent by the server.
[0020] In the above implementation, the seed project file of the target seed project can also be pre-stored in the server instead of being directly stored in the terminal device, so as to avoid wasting resources of the terminal device storage space. In addition, the step of obtaining the seed project file from the server is performed after obtaining the second project representation information selected from the received template project representation information. Therefore, it can avoid the seed project file being modified or deleted by mistake due to obtaining the seed project file from the server too early, and it can also avoid the code redundancy caused by project stagnation or termination.
[0021] In combination with the first aspect, the embodiment of the present application further provides a third optional implementation of the first aspect, which performs additional processing on the seed project file of the target seed project according to the template project file to generate the target front-end project, including:
[0022] Determine at least one difference subfile between the template project file and the seed project file of the target seed project;
[0023] For each difference sub-file in the at least one difference sub-file, the seed project file is appended according to the difference attribute of the difference sub-file to generate a target front-end project.
[0024] In the above-mentioned implementation, the seed project file of the target seed project is appended according to the template project file to generate the target front-end project, including: determining at least one difference sub-file between the template project file and the seed project file of the target seed project, and for each difference sub-file in the at least one difference sub-file, appending the seed project file according to the difference attributes of the difference sub-file to generate the target front-end project, that is, different appending processing strategies can be adopted for the seed project file according to the difference attributes of the difference sub-file to realize the construction of the target front-end project. Therefore, the front-end project construction method has a wide adaptability and application range.
[0025] In combination with the third optional implementation of the first aspect, the embodiment of the present application further provides a fourth optional implementation of the first aspect, which performs additional processing on the seed project file according to the difference attributes of the difference sub-files, including:
[0026] If the difference attribute of the difference sub-file is that the template project file has added content relative to the seed project file, the difference sub-file is added to the seed project file.
[0027] In combination with the third optional implementation of the first aspect, the embodiment of the present application further provides a fifth optional implementation of the first aspect, which performs additional processing on the seed project file according to the difference attributes of the difference sub-files, including:
[0028] If the difference attribute of the difference subfile is that the template project file has modified content relative to the seed project file, a target subfile corresponding to the difference subfile in the seed project file is determined, and the target subfile is replaced by the difference subfile.
[0029] In combination with the third optional implementation of the first aspect, the embodiment of the present application further provides a sixth optional implementation of the first aspect, which performs additional processing on the seed project file according to the difference attributes of the difference sub-files, including:
[0030] If the difference attribute of the difference sub-file is that the template project file has deleted content compared to the seed project file, the seed project file remains unchanged.
[0031] In combination with the first aspect, the embodiment of the present application further provides a seventh optional implementation of the first aspect, where the front-end engineering construction method further includes:
[0032] In response to a method library append instruction, a method library query request is generated;
[0033] Sending a method library query request to a server, so that the server can respond to the method library query request and query at least one existing engineering construction method library;
[0034] receiving method library representation information of each existing engineering construction method library in at least one existing engineering construction method library sent by the server;
[0035] Obtaining target method library representation information selected from the received method library representation information, and sending the target method library representation information to the server, so that the server can obtain the corresponding target existing project construction method library according to the target method library representation information;
[0036] Receive the target existing project construction method library sent by the server;
[0037] Append the target existing project build method library to the target front-end project.
[0038] In the above implementation, the seed project file of the target seed project is appended according to the template project file. After the target front-end project is generated, the developer can also independently select the target existing project construction method library from at least one existing project construction method library pre-stored on the server, and append the target existing project construction method library to the target front-end project, thereby improving the convenience of project development.
[0039] In combination with the first aspect, the embodiment of the present application further provides an eighth optional implementation of the first aspect, where the front-end engineering construction method further includes:
[0040] In response to the front-end project update instruction, generate an update necessity confirmation request, the update necessity confirmation request including the project type and version number of the target seed project;
[0041] Sending an update necessity confirmation request to a server, so that the server responds to the update necessity confirmation request to determine a new version of the seed project corresponding to the project type of the target seed project, and determines whether the version number of the new version of the seed project is greater than the version number of the target seed project;
[0042] The receiving server sends a new version of the seed project file when the version number of the new version of the seed project is greater than the version number of the target seed project;
[0043] Update the target front-end project according to the new version of the seed project file.
[0044] In the above implementation, the seed project file of the target seed project is additionally processed according to the template project file. After the target front-end project is generated, when the version number of the new version of the seed project stored in the server is greater than the version number of the target seed project, the new version of the seed project file can be obtained from the server, and the target front-end project can be updated according to the new version of the seed project file, thereby realizing automatic update of the target front-end project, further improving the convenience and automation of project development.
[0045] In a second aspect, the front-end engineering construction method provided in the embodiment of the present application includes:
[0046] Receiving first project characterization information sent by a terminal device and used to characterize a target seed project;
[0047] Query at least one existing template project corresponding to the target seed project according to the first project representation information;
[0048] Sending template project representation information of each existing template project in at least one existing template project to the terminal device, so that the terminal device obtains second project representation information selected from the received template project representation information;
[0049] Receiving second engineering representation information sent by the terminal device;
[0050] The template project file of the target existing template project corresponding to the second project representation information is sent to the terminal device, so that the terminal device can perform additional processing on the seed project file of the target seed project according to the template project file to generate the target front-end project.
[0051] In a third aspect, the front-end engineering construction device provided in the embodiment of the present application includes:
[0052] A first information acquisition module, used to acquire first project characterization information used to characterize the target seed project, and send the first project characterization information to the server, so that the server can query at least one existing template project corresponding to the target seed project according to the first project characterization information;
[0053] A first information receiving module, configured to receive template project representation information of each existing template project in at least one existing template project sent by a server;
[0054] A second information acquisition module, used to acquire second engineering representation information selected from the received template engineering representation information, and send the second engineering representation information to the server;
[0055] A template project file receiving module, used for receiving a template project file of a target existing template project corresponding to the second project representation information sent by the server;
[0056] The file appending module is used to append the seed project files of the target seed project according to the template project files to generate the target front-end project.
[0057] In a fourth aspect, the front-end engineering construction device provided in the embodiment of the present application includes:
[0058] A second information receiving module, used to receive first project characterization information sent by a terminal device and used to characterize a target seed project;
[0059] A template project query module, used to query at least one existing template project corresponding to the target seed project according to the first project representation information;
[0060] A first information sending module, used to send the template project representation information of each existing template project in at least one existing template project to the terminal device, so that the terminal device can obtain the second project representation information selected from the received template project representation information;
[0061] A third information receiving module, used to receive second engineering representation information sent by the terminal device;
[0062] The second information sending module is used to send the template project file of the target existing template project corresponding to the second project representation information to the terminal device, so that the terminal device can perform additional processing on the seed project file of the target seed project according to the template project file to generate the target front-end project.
[0063] In the fifth aspect, the electronic device provided in the embodiment of the present application includes a processor and a memory, and a computer program is stored in the memory. The processor is used to execute the computer program to implement the front-end engineering construction method provided by the first aspect, or any optional implementation method of the first aspect, or to implement the front-end engineering construction method provided by the second aspect.
[0064] In the sixth aspect, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, it implements the front-end engineering construction method provided by the first aspect, or any optional implementation method of the first aspect, or implements the front-end engineering construction method provided by the second aspect.
[0065] The front-end engineering construction method provided in the second aspect, the front-end engineering construction devices provided in the third and fourth aspects, the electronic setting provided in the fifth aspect, and the computer-readable storage medium provided in the sixth aspect have the same beneficial effects as the front-end engineering construction method provided in the first aspect, or any optional embodiment of the first aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 A flowchart of the steps of a front-end engineering construction method provided in an embodiment of the present application.
[0068] Figure 2 A schematic diagram of the directory structure of a seed project file provided in an embodiment of the present application.
[0069] Figure 3 A schematic diagram of the directory structure of a template engineering file provided in an embodiment of the present application.
[0070] Figure 4 A schematic diagram of the directory structure of another template engineering file provided in an embodiment of the present application.
[0071] Figure 5 A schematic diagram of the directory structure of another template engineering file provided in an embodiment of the present application.
[0072] Figure 6 A diagram illustrating the auxiliary implementation process of a front-end construction method provided in an embodiment of the present application.
[0073] Figure 7 A flowchart of the steps of another front-end engineering construction method provided in an embodiment of the present application.
[0074] Figure 8 A schematic structural block diagram of a front-end engineering construction device provided in an embodiment of the present application.
[0075] Fig. 9 A schematic structural block diagram of another front-end engineering construction device provided in an embodiment of the present application.
[0076] Fig.10 A schematic structural block diagram of an electronic device provided in an embodiment of the present application.
[0077] Figure markings: 110 - first information acquisition module; 120 - first information receiving module; 130 - second information acquisition module; 140 - template project file receiving module; 150 - file appending module; 210 - second information receiving module; 220 - template project query module; 230 - first information sending module; 240 - third information receiving module; 250 - second information sending module; 300 - electronic device; 310 - processor; 320 - memory. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In addition, it should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0079] First embodiment:
[0080] See also Figure 1 , is a flowchart of the steps of the front-end engineering construction method provided in the embodiment of the present application, including step S110, step S120, step S130, step S140 and step S150, and the front-end engineering construction method uses a terminal device. It should be noted that the front-end engineering construction method provided in the embodiment of the present application is not based on Figure 1 The order shown below is a restriction. Figure 1 Describe the specific process and steps of the front-end engineering construction method.
[0081] Step S110, obtaining first project characterization information for characterizing the target seed project, and sending the first project characterization information to a server, so that the server can query at least one existing template project corresponding to the target seed project according to the first project characterization information.
[0082] In the embodiment of the present application, the seed project can be understood as a basic project formed by combining the standard directory structure and naming conventions in the field of front-end development technology, which is used to ensure the standardization and uniformity of the project development code. For example, for a seed project created using the scaffolding provided by the Vue front-end framework, the standard directory structure of its project files is the code folder, which includes the node_modules folder, the dist folder, the src folder, the .editorconfig file, the .eslintrc.js file, the babel.config.js file, the package.json file, and the vue.config.js file. Figure 2 As shown, the naming convention is reflected in the fact that folders or files with the same function need to be named uniformly. For example, the third-party module plug-in package downloaded by the current project is uniformly named "node_modules". For another example, the resource configuration file including the basic information of the project is uniformly named "package.json".
[0083] In addition, in the embodiment of the present application, the target seed project is selected by the developer according to the project requirements, and can be one of the three seed projects of mobile terminal, PC terminal, and mini program. Among them, the mobile terminal seed project, that is, the Weex seed project, can be developed and implemented through the Weex front-end framework, the PC terminal seed project, that is, the H5 seed project, can be developed and implemented through the Vue front-end framework, and the mini program seed project can be developed and implemented through the Uniapp front-end framework. Of course, in actual implementation, the target seed project can also be other seed projects, for example, the application class Electron seed project, which is not limited in the embodiment of the present application.
[0084] For step S110, in the embodiment of the present application, as an optional implementation method, the developer can enter the first project characterization information of the target seed project in the command line window after determining the target seed project. The first project characterization information of the target seed project at least includes the project name of the target seed project, and of course, may also include the version number of the target seed project. Thereafter, the first project characterization information is sent to the server through the request method. After receiving the first project characterization information, the server queries at least one existing template project corresponding to the target seed project according to the first project characterization information. Taking an Internet company related to the financial industry as an example, at least one existing template project corresponding to the target seed project in its server may include a transfer template project, a financial management template project, and a login template project. These existing template projects can be static business template pages accumulated by Internet companies during the historical project development process and formed after mock processing.
[0085] In order to provide developers with a clear basis for seed project selection, in an embodiment of the present application, as an optional implementation, the "obtaining first project characterization information for characterizing the target seed project" included in step S110 can be implemented through steps S111, S112, S113 and S114.
[0086] Step S111, responding to the front-end project creation instruction, generating a seed project query request.
[0087] Step S112: sending a seed project query request to a server, so that the server can query at least one existing seed project in response to the seed project query request.
[0088] Step S113, receiving seed project characterization information of each existing seed project in at least one existing seed project sent by the server.
[0089] Step S114, obtaining first project representation information selected from the received seed project representation information.
[0090] Enter the front-end project creation instruction in the command line window and generate a seed project query request. Thereafter, the seed project query request is sent to the server through the request method. After receiving the seed project query request, the server responds to the seed project query request to query at least one existing seed project, and sends the seed project representation information of each existing seed project in the at least one existing seed project to the terminal device. The terminal device displays it through the command line window so that the developer and the command line window can be interactively implemented through the inquirer command later.
[0091] Take the developer's current operating directory as the wensiBankweb\madp\madp-dragvue directory of the D disk in the terminal device, and the front-end project creation instruction as "madp create" as an example. Assuming that the seed project representation information of each existing seed project in at least one existing seed project is queried to be a mobile project developed by the Weex front-end framework, a PC project developed by the Vue front-end framework, and a small program project developed by the Uniapp front-end framework, then after executing steps S111, S112, and S113, the command line window may display as follows:
[0092]
[0093] After displaying the mobile terminal project developed by Weex front-end framework, the PC terminal project developed by Vue front-end framework and the small program project developed by Uniapp front-end framework through the command line window, the developer selects the first project characterization information used to characterize the target seed project, that is, enters the first project characterization information of the target seed project in the command line window. Assuming that the developer selects "PC terminal project developed by Vue front-end framework" as the first project characterization information characterizing the target seed project from the mobile terminal project developed by Weex front-end framework, the PC terminal project developed by Vue front-end framework and the small program project developed by Uniapp front-end framework, the command line window can be displayed as follows:
[0094]
[0095] Based on the above description, it can be understood that in an embodiment of the present application, when executing step S114, that is, obtaining the first engineering representation information selected from the received seed engineering representation information, the specific selection behavior can actually be controlled and executed by the developer, that is, the developer enters the first engineering representation information in the command line window.
[0096] Through step S111, step S112, step S113 and step S114, not only a clear basis for selecting seed projects is provided to developers, but also, since at least one existing seed project is pre-stored in the server, the developer can independently select the target seed project from at least one existing seed project according to project requirements, thereby solving the problem of technology selection. That is, the developer can select different technology stacks (Weex front-end framework, Vue front-end framework and Uniapp front-end framework) according to project requirements to apply to the construction of the target front-end project, which can achieve the unification of the project directory structure, facilitate collaborative development among developers, and further improve project development efficiency.
[0097] Step S120 , receiving template project representation information of each existing template project in at least one existing template project sent by the server.
[0098] In the embodiment of the present application, the template project representation information of the existing template project includes at least the project name of the existing template project, and of course, may also include the version number of the existing template project, that is, the version number of the seed project on which the existing template project is dependent when creating the existing template project. After receiving the template project representation information of each existing template project in at least one existing template project, it can also be displayed through the command line window, so that the developer and the command line window can be interactively implemented through the inquirer command later.
[0099] Taking the first project representation information of the target seed project as "PC project developed by Vue front-end framework" as an example, assuming that the server queries the existing template projects corresponding to the target seed project according to the first project representation information, including transfer template project, financial template project and login template project, the command line window can display as follows:
[0100]
[0101] Step S130, obtaining second engineering representation information selected from the received template engineering representation information, and sending the second engineering representation information to the server.
[0102] It should be noted that in the embodiment of the present application, the specific selection behavior in step S130 can actually be controlled and executed by the developer. The behavior of the developer selecting the second project representation information from the received template project representation information is to enter the second project representation information in the command line window. Combined with the relevant example provided in step S120, assuming that the developer selects "transfer template project" as the second project representation information from the transfer template project, the financial template project and the login template project, the command line window can be displayed as follows:
[0103]
[0104] After sending the second project representation information to the server, the server searches out a target existing template project corresponding to the second project representation information, and sends the template project file of the target existing template project to the terminal device.
[0105] Step S140: receiving a template project file of a target existing template project corresponding to the second project representation information sent by the server.
[0106] After receiving the template project file, the template project file may be stored in the developer's current operating directory, and the template project file may be decompressed using a decompressing command.
[0107] Step S150, performing additional processing on the seed project file of the target seed project according to the template project file to generate the target front-end project.
[0108] For the seed engineering file, in the embodiment of the present application, it can be pre-stored in the terminal device or in the server. However, in order to avoid wasting resources of the terminal device storage space, and to avoid the seed engineering file being modified or deleted by mistake, and to avoid code redundancy caused by project stagnation or suspension, in actual implementation, the seed engineering file is preferably pre-stored in the server. In this case, for the acquisition opportunity of the seed engineering file, in the embodiment of the present application, the following two implementation methods can be provided.
[0109] A first implementation manner: after executing step S110 to send the first project representation information to the server, the server obtains the seed project file according to the first project representation information and sends it to the terminal device.
[0110] The second implementation method: after executing the sub-step "obtaining second engineering representation information selected from the received template engineering representation information" included in step S130, the first engineering representation information is sent to the server, and the server obtains the seed engineering file based on the first engineering representation information and sends it to the terminal device, that is, the front-end engineering construction method can also include steps S001 and S002.
[0111] Step S001: sending first project representation information to a server, so that the server can obtain a seed project file of a target seed project according to the first project representation information.
[0112] Step S002, receiving the seed project file sent by the server.
[0113] After receiving the seed project file, the seed project file can be stored in the developer's current operating directory, and the seed project file can be decompressed using the decompressing command.
[0114] For the above-mentioned second implementation, since the step of obtaining the seed project file from the server is performed after obtaining the second project representation information selected from the received template project representation information, compared with the above-mentioned first implementation, it can avoid to a greater extent the situation where the seed project file is accidentally modified or deleted due to obtaining the seed project file from the server too early. At the same time, it can also avoid to a greater extent the situation where code redundancy is caused by project stagnation or termination.
[0115] Further, for step S150, in the embodiment of the present application, as an optional implementation, it may include step S151 and step S152.
[0116] Step S151, determining at least one difference sub-file between the template project file and the seed project file of the target seed project.
[0117] After the template project file and the seed project file are obtained, the template project file and the seed project file may be compared to determine at least one difference sub-file between the template project file and the seed project file.
[0118] For example, the template project file can be disassembled to obtain multiple template project sub-files. Thereafter, for each template project sub-file in the multiple template project sub-files, it is determined whether there is a seed project sub-file corresponding to the template project sub-file in the seed project file. If there is no seed project sub-file corresponding to the template project sub-file in the seed project file, the template project sub-file is treated as a difference sub-file, and the difference attribute of the difference sub-file is that the template project file has added content relative to the seed project file. If there is a seed project sub-file corresponding to the template project sub-file in the seed project file, and the seed project sub-file is different from the template project sub-file (the file name is different or the file content is different), the template project sub-file is treated as a difference sub-file, and the difference attribute of the difference sub-file is that the template project file has modified content relative to the seed project file.
[0119] For another example, the seed project file can be disassembled to obtain multiple seed project sub-files. Thereafter, for each of the multiple seed project sub-files, it is determined whether there is a template project sub-file corresponding to the seed project sub-file in the template project file. If there is no template project sub-file corresponding to the seed project sub-file in the template project file, the seed project sub-file is treated as a difference sub-file, and the difference attribute of the difference sub-file is that the template project file has deleted content relative to the seed project file.
[0120] Step S152: for each difference sub-file in the at least one difference sub-file, append processing is performed on the seed project file according to the difference attribute of the difference sub-file to generate a target front-end project.
[0121] Combined with step S151, the difference attribute of the difference subfile may be that the template project file has added content relative to the seed project file, or that the template project file has modified content relative to the seed project file, or that the template project file has deleted content relative to the seed project file. Then, for the substep "append processing to the seed project file according to the difference attribute of the difference subfile" included in step S152, when actually implemented, it may also include the following three situations.
[0122] Case 1: If the difference attribute of the difference sub-file is that the template project file has added content relative to the seed project file, the difference sub-file is added to the seed project file.
[0123] Please combine Figure 2 and Figure 3 , assuming that, Figure 2 This is a schematic diagram of the directory structure of the seed project file. Figure 3 The following is a directory structure diagram of the template project file. The template project file and the seed project file are compared to determine the three difference sub-files between the template project file and the seed project file, including transferRouter.js, bankInnerTransfer.vue and bankOuterTransfer.vue. The difference attributes of these three difference sub-files are that the template project file has added content relative to the seed project file. Then, these three difference sub-files are added to the corresponding folders in the seed project file respectively. For example, transferRouter.js is added to the router folder, bankInnerTransfer.vue and bankOuterTransfer.vue are collected in transfer and added to the views folder.
[0124] The second case: if the difference attribute of the difference sub-file is that the template project file has modified content relative to the seed project file, then the target sub-file corresponding to the difference sub-file in the seed project file is determined, and the target sub-file is replaced by the difference sub-file.
[0125] Similarly, Figure 2 and Figure 3 For example, suppose that Figure 2 This is a schematic diagram of the directory structure of the seed project file. Figure 3 The following is a directory structure diagram of the template project file. The template project file and the seed project file are compared to determine that in addition to the three difference sub-files transferRouter.js, bankInnerTransfer.vue and bankOuterTransfer.vue, there are two difference sub-files App.vue and main.js between the template project file and the seed project file, and the difference attributes of the two difference sub-files are that the template project file has modified content relative to the seed project file (file content modification). Then, the target sub-files corresponding to the two difference sub-files in the seed project file are determined respectively, and the corresponding target sub-files are replaced by the two difference sub-files. For example, App.vue in the template project file replaces App.vue in the seed project file, and main.js in the template project file replaces main.js in the seed project file.
[0126] The third case: If the difference attribute of the difference sub-file is that the template project file has deleted content compared with the seed project file, the seed project file remains unchanged.
[0127] by Figure 2 and Figure 4 For example, suppose that Figure 2 This is a schematic diagram of the directory structure of the seed project file. Figure 4 The following is a schematic diagram of the directory structure of the template project file. The template project file and the seed project file are compared to determine that in addition to the three difference sub-files transferRouter.js, bankInnerTransfer.vue and bankOuterTransfer.vue, there are also two difference sub-files App.vue and main.js between the template project file and the seed project file, and the difference attributes of these two difference sub-files are that the template project file has deleted content relative to the seed project file, then the seed project file remains unchanged, that is, the two difference sub-files included in the seed project file are not deleted.
[0128] In addition, in the embodiment of the present application, the action of adding the difference sub-file to the seed project file can be implemented through the fs-extra command, which is not described in detail in the embodiment of the present application.
[0129] In the above implementation, since different additional processing strategies are adopted for the seed project files according to the difference attributes of the difference sub-files to achieve the construction of the target front-end project, the front-end project construction method including step S151 and step S152 has a wider adaptability and application range.
[0130] After generating the target front-end project, you can generate a dependency package download request and send it to the server. After receiving the dependency package download request, the server sends the dependency package corresponding to the template front-end project to the terminal device, generates a download completion prompt, and then displays it through the command line window. After that, the developer can start running the current front-end project.
[0131] To improve the convenience of project development, in an embodiment of the present application, after executing step S150, step S161, step S162, step S163, step S164, step S165 and step S166 may also be included.
[0132] Step S161, responding to the method library append instruction, generating a method library query request.
[0133] Step S162: sending a method library query request to a server, so that the server can query at least one existing engineering construction method library in response to the method library query request.
[0134] Step S163: receiving method library representation information of each existing engineering construction method library in at least one existing engineering construction method library sent by the server.
[0135] Enter a method library append instruction in the command line window, and generate a method library query request. Thereafter, send the method library query request to the server through the request method. After receiving the method library query request, the server responds to the method library query request to query at least one existing project construction method library, and sends the method library representation information of each existing project construction method library in the at least one existing project construction method library to the terminal device, which is displayed through the command line window so that the developer and the command line window can be interactively implemented through the inquirer command. Among them, the existing project construction method library can be a js method library, for example, aes.js method library, rsa.js method library, echart.js method library and common.js method library, and the method library representation information at least includes the name of the existing project construction method library, and of course, it can also include a functional introduction of the existing project construction method library.
[0136] In combination with the relevant example provided in step S130, taking the method library appending instruction as "madp update" as an example, assuming that the server responds to the method library query request and queries four existing project construction method libraries, including aes.js method library, rsa.js method library, echart.js method library and common.js method library, the command line window may display as follows:
[0137]
[0138]
[0139] Step S164, obtaining target method library representation information selected from the received method library representation information, and sending the target method library representation information to the server, so that the server can obtain the corresponding target existing engineering construction method library according to the target method library representation information.
[0140] It should be noted that in the embodiment of the present application, the specific selection behavior in step S140 can actually be controlled and executed by the developer. The behavior of the developer selecting the target method library representation information from the received method library representation information is to enter the target method library representation information in the command line window. Combined with the relevant examples provided in steps S161, S162 and S163, assuming that the developer selects "aes.js" as the target method library representation information from aes.js, rsa.js, echart.js and common.js, the command line window can be displayed as follows:
[0141]
[0142] Step S165, receiving the target existing project construction method library sent by the server.
[0143] After receiving the target existing project construction method library, the target existing project construction method library may be stored in the developer's current operation directory, and the target existing project construction method library may be decompressed by a decompressing command.
[0144] Step S166, adding the target existing project construction method library to the target front-end project.
[0145] For step S166, in the embodiment of the present application, the target existing project construction method library can be added to the utils folder in the target front-end project. Figure 3 As shown in the following example, after adding the aes.js method library, the directory structure of the target front-end project is as follows Figure 5 shown.
[0146] In the above implementation, after the seed project file is appended according to the template project file and the target front-end project is generated, the developer can also independently select the target existing project construction method library from at least one existing project construction method library pre-stored on the server, and append the target existing project construction method library to the target front-end project, thereby improving the convenience of project development.
[0147] In order to improve the convenience and automation of project development, in the embodiment of the present application, after executing step S150, step S171, step S172, step S173 and step S174 may also be included.
[0148] Step S171, in response to the front-end project update instruction, generating an update necessity confirmation request, the update necessity confirmation request including the project type and version number of the target seed project.
[0149] In actual implementation, the project type and version number of the seed project that the target front-end project depends on when creating the target front-end project, that is, the project type and version number of the target seed project, can be extracted from the package.json file of the target front-end project, and an update necessity confirmation request can be generated, including the project type and version number of the target seed project.
[0150] Step S172, sending an update necessity confirmation request to the server, so that the server responds to the update necessity confirmation request to determine a new version of the seed project corresponding to the project type of the target seed project, and determines whether the version number of the new version of the seed project is greater than the version number of the target seed project.
[0151] If the version number of the new seed project is greater than the version number of the target seed project, the new seed project file of the new seed project is sent to the terminal device. If the version number of the new seed project is less than or equal to the version number of the target seed project, a prompt message, such as "null", is generated and sent to the terminal device to inform the developer that the current version is already the latest version, so no update is required.
[0152] Step S173, receiving a new version seed project file of a new version seed project sent by the server when the version number of the new version seed project is greater than the version number of the target seed project.
[0153] After receiving the new version of the seed project file, the new version of the seed project file can be stored in the developer's current operating directory, and the new version of the seed project file can be decompressed by using the decompressing command.
[0154] Step S174, updating the target front-end project according to the new version of the seed project file.
[0155] For step S174, in the embodiment of the present application, the package.json file included in the target front-end project can be replaced by the package.json file included in the new version of the seed project file. At the same time, the vue.config.js file included in the target front-end project can be replaced by the vue.config.js file included in the new version of the seed project file. The specific replacement action can be implemented by the fs-extra command, which is not elaborated in the embodiment of the present application.
[0156] The following will be combined Figure 6 , an overall description is given of the implementation process of a front-end engineering construction method provided in an embodiment of the present application.
[0157] In the process of constructing the target template project by the front-end project construction method provided by the embodiment of the present application, first of all, it is necessary to determine the technical selection. Taking the server including three sets of existing seed projects, that is, mobile seed projects, PC seed projects, and mini-program seed projects as an example, the target seed project is selected from these three sets of existing seed projects, among which the mobile seed project is implemented through the Weex front-end framework development, the PC seed project is implemented through the Vue front-end framework development, and the mini-program seed project is implemented through the Uniapp front-end framework development.
[0158] After the target seed project is selected, a target existing template project is selected from at least one existing template project corresponding to the target seed project, and the seed project file of the target seed project is additionally processed according to the template project file to generate the target front-end project.
[0159] After the target front-end project is generated, the target front-end project can be started. In the subsequent process, some tool set resources can also be added to the target front-end project, for example, the aforementioned target existing project construction method library. At the same time, in the server, when the version number of the new version of the seed project is greater than the version number of the target seed project, the server will also receive the new version of the seed project file sent by the server, and update the target front-end project according to the new version of the seed project file.
[0160] In summary, during the implementation of the front-end engineering construction method provided by the present application, since at least one existing template project is pre-stored in the server, the developer can independently select the target existing template project from at least one existing template project according to the project requirements, and directly append the seed project file of the target seed project according to the template project file, thereby realizing the construction of the target front-end project without starting from a clean seed project, thereby improving the project development efficiency.
[0161] Second embodiment:
[0162] See also Figure 7 , is a flowchart of the steps of the front-end engineering construction method provided in the embodiment of the present application, including step S210, step S220, step S230, step S240 and step S250, and the front-end engineering construction method application server. It should be noted that the front-end engineering construction method provided in the embodiment of the present application is not based on Figure 7 The order shown below is a restriction. Figure 7 Describe the specific process and steps of the front-end engineering construction method.
[0163] Step S210: receiving first project characterization information sent by a terminal device and used to characterize a target seed project.
[0164] Step S220: query at least one existing template project corresponding to the target seed project according to the first project representation information.
[0165] Step S230 , sending the template project representation information of each existing template project in at least one existing template project to the terminal device, so that the terminal device can obtain the second project representation information selected from the received template project representation information.
[0166] Step S240: receiving second engineering representation information sent by the terminal device.
[0167] Step S250, sending the template project file of the target existing template project corresponding to the second project representation information to the terminal device, so that the terminal device can perform additional processing on the seed project file of the target seed project according to the template project file to generate the target front-end project.
[0168] Obviously, the front-end engineering construction method provided in the embodiment of the present application is applied to the server, while the front-end engineering construction method provided in the first embodiment is applied to the terminal device, and the terminal device interacts with the server, and finally, the construction of the target front-end engineering is realized. Therefore, for the front-end engineering construction method provided in the second embodiment, its specific implementation process can refer to the relevant description of the corresponding steps in the embodiment of the front-end engineering construction method provided in the first embodiment, and will not be repeated here.
[0169] Third embodiment:
[0170] Based on the same inventive concept as the front-end engineering construction method provided in the first embodiment, the present application embodiment also provides a front-end engineering construction device. Figure 8 The front-end engineering construction device provided in the embodiment of the present application includes a first information acquisition module 110, a first information receiving module 120, a second information acquisition module 130, a template engineering file receiving module 140 and a file appending module 150.
[0171] The first information acquisition module 110 is used to acquire first project characterization information for characterizing the target seed project, and send the first project characterization information to the server, so that the server can query at least one existing template project corresponding to the target seed project according to the first project characterization information.
[0172] The first information receiving module 120 is used to receive template project representation information of each existing template project in at least one existing template project sent by the server.
[0173] The second information acquisition module 130 is used to acquire second engineering representation information selected from the received template engineering representation information, and send the second engineering representation information to the server.
[0174] The template project file receiving module 140 is used to receive the template project file of the target existing template project corresponding to the second project representation information sent by the server.
[0175] The file appending module 150 is used to perform appending processing on the seed project file of the target seed project according to the template project file to generate the target front-end project.
[0176] The engineering construction module provided in the embodiment of the present application may further include a first request generating module, a first request sending module and a fourth information receiving module.
[0177] The first request generation module is used to respond to the front-end project creation instruction and generate a seed project query request.
[0178] The first request sending module is used to send a seed project query request to the server, so that the server can respond to the seed project query request and query at least one existing seed project.
[0179] The fourth information receiving module is used to receive seed project characterization information of each existing seed project in at least one existing seed project sent by the server.
[0180] The first information acquisition module 110 is specifically configured to acquire first project representation information selected from the received seed project representation information.
[0181] The engineering construction module provided in the embodiment of the present application may further include a third information sending module and a first seed engineering file receiving module.
[0182] The third information sending module is used to send the first project representation information to the server, so that the server can obtain the seed project file of the target seed project according to the first project representation information.
[0183] The first seed project file receiving module is used to receive the seed project file sent by the server.
[0184] In the embodiment of the present application, the file appending module 150 may include a difference sub-file determining unit and a file appending unit.
[0185] The difference sub-file determining unit is used to determine at least one difference sub-file between the template project file and the seed project file of the target seed project.
[0186] The file appending unit is used for appending the seed project file to each difference sub-file in at least one difference sub-file according to the difference attribute of the difference sub-file to generate a target front-end project.
[0187] In the embodiment of the present application, the file appending unit may include a first file appending sub-unit.
[0188] The first file appending subunit is used to add the difference subfile to the seed project file when the difference attribute of the difference subfile is that the template project file has added content relative to the seed project file.
[0189] In the embodiment of the present application, the file appending unit may include a second file appending sub-unit.
[0190] The second file appending subunit is used to determine the target subfile corresponding to the difference subfile in the seed project file when the difference attribute of the difference subfile is that the template project file has modified content relative to the seed project file, and replace the target subfile with the difference subfile.
[0191] In the embodiment of the present application, the file appending unit may include a third file appending sub-unit.
[0192] The third file appending subunit is used to keep the seed project file unchanged when the difference attribute of the difference subfile is that the template project file has deleted content relative to the seed project file.
[0193] The front-end engineering construction device provided in the embodiment of the present application may also include a second request generating module, a second request sending module, a fifth information receiving module, a fourth information sending module, an engineering construction method library receiving module and an engineering construction method library appending module.
[0194] The second request generating module is used to respond to the method library appending instruction and generate a method library query request.
[0195] The second request sending module is used to send a method library query request to the server, so that the server responds to the method library query request and queries at least one existing engineering construction method library.
[0196] The fifth information receiving module is used to receive method library representation information of each existing engineering construction method library in at least one existing engineering construction method library sent by the server.
[0197] The fourth information sending module is used to obtain target method library representation information selected from the received method library representation information, and send the target method library representation information to the server, so that the server can obtain the corresponding target existing engineering construction method library according to the target method library representation information.
[0198] The project construction method library receiving module is used to receive the target existing project construction method library sent by the server.
[0199] The project construction method library appending module is used to append the target existing project construction method library to the target front-end project.
[0200] The front-end engineering construction device provided in the embodiment of the present application may also include a third request generating module, a third request sending module, a second seed engineering file receiving module and a front-end engineering updating module.
[0201] The third request generation module is used to respond to the front-end project update instruction and generate an update necessity confirmation request, where the update necessity confirmation request includes the project type and version number of the target seed project.
[0202] The third request sending module is used to send an update necessity confirmation request to the server, so that the server responds to the update necessity confirmation request to determine the new version of the seed project corresponding to the project type of the target seed project, and judge whether the version number of the new version of the seed project is greater than the version number of the target seed project.
[0203] The second seed project file receiving module is used to receive a new version seed project file of a new version seed project sent by the server when the version number of the new version seed project is greater than the version number of the target seed project.
[0204] The front-end project update module is used to update the target front-end project according to the new version of the seed project file.
[0205] Since the front-end engineering construction device provided in the embodiment of the present application is implemented based on the same inventive concept as the front-end engineering construction method provided in the first embodiment, the specific description of each software module in the front-end engineering construction device provided in the embodiment of the present application can refer to the relevant description of the corresponding steps in the embodiment of the front-end engineering construction method provided in the first embodiment, and will not be repeated here.
[0206] Fourth embodiment:
[0207] Based on the same inventive concept as the front-end engineering construction method provided in the second embodiment, the present application embodiment also provides a front-end engineering construction device. Fig. 9 The front-end engineering construction device provided in the embodiment of the present application includes a second information receiving module 210, a template engineering query module 220, a first information sending module 230, a third information receiving module 240 and a second information sending module 250.
[0208] The second information receiving module 210 is used to receive first project characterization information sent by a terminal device and used to characterize a target seed project.
[0209] The template project query module 220 is used to query at least one existing template project corresponding to the target seed project according to the first project representation information.
[0210] The first information sending module 230 is used to send the template project representation information of each existing template project in at least one existing template project to the terminal device, so that the terminal device can obtain the second project representation information selected from the received template project representation information.
[0211] The third information receiving module 240 is used to receive the second engineering representation information sent by the terminal device.
[0212] The second information sending module 250 is used to send the template project file of the target existing template project corresponding to the second project representation information to the terminal device, so that the terminal device can perform additional processing on the seed project file of the target seed project according to the template project file to generate the target front-end project.
[0213] Since the front-end engineering construction device provided in the embodiment of the present application is implemented based on the same inventive concept as the front-end engineering construction method provided in the second embodiment, the specific description of each software module in the front-end engineering construction device provided in the embodiment of the present application can refer to the relevant description of the corresponding steps in the embodiment of the front-end engineering construction method provided in the second embodiment, and will not be repeated here.
[0214] Fifth embodiment:
[0215] See also Fig.10 , which is a schematic structural block diagram of an electronic device 300 provided in an embodiment of the present application. In the embodiment of the present application, the electronic device 300 may be a terminal device to which the front-end engineering construction method provided in the first embodiment and the front-end engineering construction device provided in the third embodiment are applied, such as a computer, a personal digital assistant (PAD), a mobile Internet device (MID), etc., and may also be a server to which the front-end engineering construction method provided in the second embodiment and the front-end engineering construction device provided in the fourth embodiment are applied, and the embodiment of the present application does not impose specific restrictions on this.
[0216] Structurally, the electronic device 300 may include a processor 310 and a memory 320 .
[0217] The processor 310 and the memory 320 are electrically connected directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The front-end engineering construction device includes at least one software module that can be stored in the memory 320 in the form of software or firmware or solidified in the operating system (OS) of the electronic device 300. The processor 310 is used to execute the executable modules stored in the memory 320, for example, the software function modules and computer programs included in the front-end engineering construction device, so as to realize the front-end engineering construction method.
[0218] The processor 310 can execute the computer program after receiving the execution instruction. The processor 310 can be an integrated circuit chip with signal processing capabilities. The processor 310 can also be a general-purpose processor, for example, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. In addition, the general-purpose processor can be a microprocessor or any conventional processor.
[0219] The memory 320 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), and an electric erasable programmable read-only memory (EEPROM). The memory 320 is used to store a program, and the processor 310 executes the program after receiving an execution instruction.
[0220] It should be understood that Fig.10 The structure shown is for illustration only. The electronic device 300 provided in the embodiment of the present application may also have Fig.10 Fewer or more components, or with Fig.10 Different configurations shown, such as displays, input and output devices, etc., in addition, Fig.10 The components shown may be implemented by software, hardware or a combination thereof.
[0221] Sixth embodiment:
[0222] The application embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the front-end engineering construction method provided in the first embodiment can be implemented, or the front-end engineering construction method provided in the second embodiment can be implemented.
[0223] In summary, the front-end engineering construction method provided by the present application includes obtaining first engineering characterization information for characterizing a target seed engineering, and sending the first engineering characterization information to a server, so that the server can query at least one existing template engineering corresponding to the target seed engineering according to the first engineering characterization information, and receive the template engineering characterization information of each existing template engineering in at least one existing template engineering sent by the server, and then, obtain the second engineering characterization information selected from the received template engineering characterization information, and send the second engineering characterization information to the server, and receive the template engineering file of the target existing template engineering corresponding to the second engineering characterization information sent by the server, and finally, according to the template engineering file, the seed engineering file of the target seed engineering is appended and processed to generate the target front-end engineering. In the implementation process of the front-end engineering construction method provided by the present application, since at least one existing template engineering is pre-stored in the server, the developer can independently select the target existing template engineering from at least one existing template engineering according to the project requirements, and directly append the seed engineering file of the target seed engineering according to the template engineering file, thereby realizing the construction of the target front-end engineering without starting from a clean seed engineering, and therefore, it is possible to improve the efficiency of project development.
[0224] The front-end engineering construction device, electronic device and computer-readable storage medium provided in the embodiments of the present application have the same beneficial effects as the above-mentioned front-end engineering construction method, which will not be repeated here.
[0225] It is understood that in the above-mentioned embodiments provided in the present application, the disclosed methods and devices can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the methods, devices and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. In addition, in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0226] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0227] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a computer-readable storage medium, including 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 method described in each embodiment of the present application. The above-mentioned computer-readable storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, RAM, ROM disks or optical disks.
[0228] It should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0229] It should also be noted that, in this article, relational terms such as "first", "second" and "third" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
Claims
1. A front-end engineering construction method, characterized in that: include: Acquire first project characterization information for characterizing a target seed project, and send the first project characterization information to a server, so that the server can query at least one existing template project corresponding to the target seed project according to the first project characterization information; receiving template project representation information of each existing template project in the at least one existing template project sent by the server; Acquire second engineering representation information selected from the received template engineering representation information, and send the second engineering representation information to the server; Receiving a template project file of a target existing template project corresponding to the second project representation information sent by the server; Performing additional processing on the seed project file of the target seed project according to the template project file to generate a target front-end project; After obtaining the second engineering representation information selected from the received template engineering representation information, the front-end engineering construction method further includes: Sending the first project representation information to the server, so that the server can obtain the seed project file of the target seed project according to the first project representation information; Receive the seed project file sent by the server.
2. The front-end engineering construction method according to claim 1, characterized in that: The obtaining of first engineering characterization information for characterizing the target seed engineering includes: Respond to the front-end project creation instruction and generate a seed project query request; Sending the seed project query request to the server, so that the server can query at least one existing seed project in response to the seed project query request; receiving seed project characterization information of each existing seed project in the at least one existing seed project sent by the server; The first project representation information selected from the received seed project representation information is obtained.
3. The front-end engineering construction method according to claim 1, characterized in that: The step of appending the seed project file of the target seed project according to the template project file to generate the target front-end project includes: Determine at least one difference subfile between the template project file and the seed project file of the target seed project; For each difference sub-file in the at least one difference sub-file, the seed project file is appended according to the difference attribute of the difference sub-file to generate a target front-end project.
4. The front-end engineering construction method according to claim 3, characterized in that: The appending process of the seed project file according to the difference attribute of the difference sub-file includes: If the difference attribute of the difference sub-file is that the template project file has added content relative to the seed project file, the difference sub-file is added to the seed project file.
5. The front-end engineering construction method according to claim 3, characterized in that: The appending process of the seed project file according to the difference attribute of the difference sub-file includes: If the difference attribute of the difference subfile is that the template project file has modified content relative to the seed project file, a target subfile corresponding to the difference subfile in the seed project file is determined, and the target subfile is replaced by the difference subfile.
6. The front-end engineering construction method according to claim 3, characterized in that: The appending process of the seed project file according to the difference attribute of the difference sub-file includes: If the difference attribute of the difference sub-file is that the template project file has deleted content relative to the seed project file, the seed project file remains unchanged.
7. The front-end engineering construction method according to claim 1, characterized in that: The front-end engineering construction method also includes: In response to a method library append instruction, a method library query request is generated; Sending the method library query request to the server, so that the server can query at least one existing engineering construction method library in response to the method library query request; receiving method library representation information of each existing engineering construction method library in the at least one existing engineering construction method library sent by the server; Acquire target method library representation information selected from the received method library representation information, and send the target method library representation information to the server, so that the server acquires the corresponding target existing engineering construction method library according to the target method library representation information; Receiving the target existing engineering construction method library sent by the server; The target existing project construction method library is added to the target front-end project.
8. The front-end engineering construction method according to claim 1, characterized in that: The front-end engineering construction method also includes: In response to the front-end project update instruction, generate an update necessity confirmation request, wherein the update necessity confirmation request includes the project type and version number of the target seed project; Sending the update necessity confirmation request to the server, so that the server responds to the update necessity confirmation request to determine a new version of the seed project corresponding to the project type of the target seed project, and determines whether the version number of the new version of the seed project is greater than the version number of the target seed project; Receiving a new version seed project file of the new version seed project sent by the server when the version number of the new version seed project is greater than the version number of the target seed project; The target front-end project is updated according to the new version of the seed project file.
9. A front-end engineering construction method, characterized in that: include: Receiving first project characterization information sent by a terminal device and used to characterize a target seed project; Query at least one existing template project corresponding to the target seed project according to the first project representation information; Sending the template project representation information of each existing template project in the at least one existing template project to the terminal device, so that the terminal device can obtain the second project representation information selected from the received template project representation information; Receiving the second engineering representation information sent by the terminal device; Sending the template project file of the target existing template project corresponding to the second project representation information to the terminal device, so that the terminal device can perform additional processing on the seed project file of the target seed project according to the template project file to generate a target front-end project; After sending the template project representation information of each existing template project in the at least one existing template project to the terminal device, the front-end project construction method further includes: receiving the first project representation information from the terminal device to obtain a seed project file of the target seed project according to the first project representation information; The seed project file is sent to the terminal device.
10. A front-end engineering construction device, characterized in that: include: A first information acquisition module, used to acquire first project characterization information used to characterize a target seed project, and send the first project characterization information to a server, so that the server can query at least one existing template project corresponding to the target seed project according to the first project characterization information; A first information receiving module, configured to receive template project representation information of each existing template project in the at least one existing template project sent by the server; A second information acquisition module, configured to acquire second engineering representation information selected from the received template engineering representation information, and send the second engineering representation information to the server; A template project file receiving module, used for receiving a template project file of a target existing template project corresponding to the second project representation information sent by the server; A file appending module, used for appending the seed project file of the target seed project according to the template project file to generate a target front-end project; The device also includes a third information sending module and a first seed engineering file receiving module; The third information sending module is used to send the first project representation information to the server after acquiring the second project representation information selected from the received template project representation information, so that the server can obtain the seed project file of the target seed project according to the first project representation information; The first seed project file receiving module is used to receive the seed project file sent by the server.
11. A front-end engineering construction device, characterized in that: include: A second information receiving module, used to receive first project characterization information sent by a terminal device and used to characterize a target seed project; A template project query module, used to query at least one existing template project corresponding to the target seed project according to the first project representation information; A first information sending module, used for sending the template project representation information of each existing template project in the at least one existing template project to the terminal device, so that the terminal device can obtain the second project representation information selected from the received template project representation information; A third information receiving module, used to receive the second engineering representation information sent by the terminal device; A second information sending module, configured to send a template project file of a target existing template project corresponding to the second project representation information to the terminal device, so that the terminal device can perform additional processing on the seed project file of the target seed project according to the template project file to generate a target front-end project; The device also includes a third information receiving module and a first seed engineering file sending module; The third information receiving module is used to receive the first project representation information from the terminal device after sending the template project representation information of each existing template project in the at least one existing template project to the terminal device, so as to obtain the seed project file of the target seed project according to the first project representation information; The first seed project file sending module is used to send the seed project file to the terminal device.
12. An electronic device, characterized in that: It includes a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the front-end engineering construction method described in any one of claims 1 to 8, or to implement the front-end engineering construction method described in claim 9.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the front-end engineering construction method described in any one of claims 1 to 8, or implements the front-end engineering construction method described in claim 9.
