Low-code front-end engineering generation method and system, medium and computer equipment
Through the low-code front-end project generation method, the front-end project is determined by using the project identifier and NPM cache identifier, and the execution command script is spliced to realize the parameterization and interface construction of the pipeline template, which solves the difficulty of applying traditional DevOps pipeline templates in small teams and improves development efficiency and software quality.
Patent Information
- Application Number
- CN202510882049.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-26
AI Technical Summary
Traditional DevOps pipeline templates have a learning curve when understanding and editing advanced processes, making them difficult for small teams to implement and requiring resources to invest in customized development and optimization, limiting their widespread application.
It provides a low-code front-end project generation method, determines the generated front-end project through the project identifier and NPM cache identifier, splices the execution command script, uses the pipeline low-code front-end project construction template for parameterization and interface construction, standardizes various execution command scripts, and supports low-code front-end project construction in various scenarios.
Accelerate the development cycle, reduce manual operations, improve software quality, reduce development costs and maintenance difficulties, ensure the consistency and repeatability of the build process, and improve team collaboration efficiency.
Smart Images

Figure CN120704665A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and specifically to a low-code front-end engineering generation method, system, medium and computer equipment. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] DevOps pipeline templates are standardized process frameworks used to automate software development and operations. At their core, they use automated tools to connect code building, testing, deployment, and monitoring, ensuring efficient, high-quality software delivery. Currently, DevOps pipeline templates are becoming increasingly standardized and automated. Pipeline templates are increasingly being used to standardize CI / CD processes to ensure consistency and reduce human error. The level of automation in pipeline templates is constantly increasing, and every step from code submission to deployment can be automatically executed using preset templates.
[0004] However, although pipelines have simplified many processes, as the scale of systems grows and the technology stack diversifies, there is still a certain learning curve for some traditional IT personnel to understand and effectively edit advanced pipeline processes, which limits its widespread application in some organizations. Implementing efficient pipelines requires investing resources in customized development and continuous optimization, which poses a problem for small teams with limited organizational structure. Summary of the Invention
[0005] In order to address the shortcomings of the existing technology, the present invention provides a low-code front-end engineering generation method, system, medium and computer equipment, which supports the construction of low-code front-end engineering in various scenarios through pipeline tools, accelerates the development cycle, reduces manual operations, and improves software quality.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a low-code front-end engineering generation method.
[0007] A low-code front-end engineering generation method includes the following processes: Determine the front-end project to be generated based on the project identifier and the NPM cache identifier, and then splice the execution command script corresponding to the front-end project; Splice and generate the execution command script for the front-end engineering metadata package step; Splice and generate the execution command script for the front-end engineering resource file steps; Splice the execution command script of the front-end engineering code compilation steps; Splice and extract the execution command scripts of all deployment file steps to generate the front-end project that needs to be generated.
[0008] As a further limitation of the first aspect of the present invention, determining the front-end project to be generated based on the project identifier and the NPM cache identifier, and then splicing the execution command script corresponding to the front-end project, includes: When the NPM cache flag is offline and the computer project flag is true, the execution command script of the offline compilation step of the computer front-end code is spliced; When the NPM cache flag is online and the computer-side project flag is true, the execution command script for the online compilation step of the computer-side front-end code is spliced; When the NPM cache flag is offline and the mobile project flag is true, the execution command script for the offline compilation step of the mobile front-end code is spliced; When the NPM cache flag is online and the mobile project flag is true, the execution command script for the online compilation step of the mobile front-end code is spliced.
[0009] As a further limitation of the first aspect of the present invention, before determining the front-end project to be generated based on the project identifier and the NPM cache identifier, it also includes script standardization of the low-code front-end project construction process: Standardize the execution command script for the online compilation steps of the front-end code on the computer side; Standardize the execution command script for the offline compilation steps of the front-end code on the computer side; Standardize the execution command script for the online compilation steps of mobile front-end code; Standardize the execution command script for offline compilation of mobile front-end code; Standardize the execution command scripts of the front-end engineering metadata package steps; Standardize the execution command scripts of front-end engineering resource file steps; Standardize the execution command script for the front-end engineering code compilation steps; Standardize the execution command script for extracting and packaging all deployment files.
[0010] As a further limitation of the first aspect of the present invention, the parameters that need to be changed in the command line of the standardized steps are variableized, and the variable parameters are configured through the pipeline template front-end interface. When the back-end pipeline execution script is constructed, the command script references the passed parameters in the form of environment variables.
[0011] As a further limitation of the first aspect of the present invention, a pipeline low-code front-end engineering construction template is used, and the execution command script corresponding to the front-end engineering is spliced, and the pipeline low-code front-end engineering construction template is parameterized and interfaced, including: The parameters of the pipeline low-code front-end engineering construction template include: computer-side project ID, mobile-side project ID, front-end engineering path, package version, warehouse name, Maven configuration address, NPM cache ID, computer-side package.json path, and mobile-side package.json path.
[0012] As a further limitation of the first aspect of the present invention, the execution command script of the splicing computer-side front-end code offline compilation step includes: locating the computer-side source code directory according to the front-end project path; confirming the dependency configuration through the computer-side package.json path; calling the local cache path to perform offline compilation according to the computer-side source code directory and the dependency configuration; Splice the execution command script of the computer-side front-end code online compilation steps, including: directly executing online dependency download and compilation through the front-end project path and the computer-side package.json path; Splice the execution command script for the offline compilation steps of the mobile front-end code, including: locating the mobile source code directory according to the front-end project path; confirming the dependency configuration through the mobile package.json path; calling the local cache path to perform offline compilation based on the mobile source code directory and the dependency configuration; Splice the execution command script of the online compilation steps of the mobile front-end code, including: directly executing online dependency download and compilation through the front-end project path and the computer package.json path.
[0013] As a further limitation of the first aspect of the present invention, the execution command script of the step of splicing and generating a front-end engineering metadata package includes: extracting metadata from the front-end engineering path, associating the metadata with a warehouse name, and generating a standardized description file; The execution command script for the steps of splicing and generating front-end engineering resource files includes: locating static resources according to the front-end engineering path, and marking the resource version numbers in combination with the package version; Splice the execution command script of the front-end engineering code compilation step, including: specifying the private warehouse or mirror configuration through the Maven configuration address, and injecting the package version into the Maven build parameters.
[0014] In the second aspect, the present invention provides a low-code front-end engineering generation system.
[0015] A low-code front-end engineering generation system, comprising: The first splicing unit is configured to: determine the front-end project to be generated according to the project identifier and the NPM cache identifier, and then splice the execution command script corresponding to the front-end project; The second splicing unit is configured to: splice the execution command script of the step of generating the front-end engineering metadata package; The third splicing unit is configured to: splice the execution command script of the step of generating the front-end engineering resource file; The fourth splicing unit is configured to: splice the execution command script of the Java code compilation step of the front-end project; The fifth splicing unit is configured to: splice and extract the execution command scripts of the steps of packaging all deployment files to generate the front-end project that needs to be generated.
[0016] In a third aspect, the present invention provides a computer device comprising: a processor and a computer-readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, the low-code front-end engineering generation method as described in the first aspect of the present invention is implemented.
[0017] In a fourth aspect, the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the low-code front-end engineering generation method described in the first aspect of the present invention.
[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention innovatively proposes a low-code front-end project generation method, which determines the front-end project to be generated according to the project identifier and the NPM cache identifier, and then splices the execution command scripts corresponding to the front-end project, including the execution command scripts for the steps of generating the front-end project metadata package, the execution command scripts for the steps of generating the front-end project resource files, the execution command scripts for the steps of compiling the front-end project Java code, and the execution command scripts for the steps of extracting and packaging all deployment files. It automatically generates the front-end project that needs to be generated, supports the construction of low-code front-end projects in various scenarios through pipeline tools, accelerates the development cycle, reduces manual operations, and improves software quality.
[0019] 2. The present invention innovatively proposes a low-code front-end engineering generation method, which automatically splices corresponding execution command scripts according to different identifiers, avoiding the tedious process of manually writing and configuring commands, reducing the possibility of human errors, and greatly improving development efficiency. Developers do not need to have an in-depth understanding of the specific commands and parameters of each compilation step. They only need to pay attention to the settings of the project identifier and NPM cache identifier to quickly generate the required low-code front-end engineering. It can flexibly adapt to the changes in requirements of different projects and different stages. When the project requirements switch from offline development to online development, or expand from the computer side to the mobile side, it only needs to adjust the corresponding identifier to automatically generate an execution command script that meets the new requirements. There is no need to make large-scale modifications to the entire generation process, which reduces development costs and maintenance difficulties.
[0020] 3. The present invention innovatively proposes a low-code front-end project generation method. Before determining the front-end project process to be generated based on the project identifier and the NPM cache identifier, the script of the low-code front-end project construction process is standardized. By standardizing various execution command scripts, developers do not need to rewrite or search for relevant commands every time they build different types of low-code front-end projects. For example, whether it is a computer or mobile terminal, online or offline compilation scenario, there are ready-made standardized scripts available, which greatly saves development time and effort; when the project requirements change and it is necessary to switch the project type (such as from computer to mobile terminal) or compilation environment (such as from online to offline), the developer only needs to adjust the project identifier and NPM cache identifier to quickly call the corresponding standardized script for construction, without having to re-familiarize and configure new commands, and can quickly respond to project requirements and improve the development iteration speed.
[0021] 4. The present invention innovatively proposes a low-code front-end engineering generation method, adopts a pipeline low-code front-end engineering construction template, splices the execution command script corresponding to the front-end engineering, and parameterizes and interfaces the pipeline low-code front-end engineering construction template. The parameterized template can flexibly adapt to different project types (computer side, mobile side), different project configurations (front-end engineering path, package version, etc.) and different environment settings (Maven configuration address, NPM cache identifier, etc.), making the construction process more universal and flexible. Through parameterized and interfaced construction templates, team members can follow the same construction standards and processes to ensure that the construction process between different projects is consistent and repeatable, which helps to improve the overall collaboration efficiency and quality of the team.
[0022] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0024] Figure 1 A flowchart of a low-code front-end engineering generation method provided by an exemplary embodiment of the present invention; Figure 2 A schematic diagram of a low-code front-end engineering generation system provided for an exemplary embodiment of the present invention; Figure 3 A schematic diagram of a computer device is provided for an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0026] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0027] As described in the background technology, when developers use the DevOps platform pipeline to implement low-code front-end engineering construction, they need to manually write the pipeline construction script first. When the low-code front-end engineering construction scenario changes, the developer needs to manually change the pipeline construction script. In view of this, the present invention proposes a low-code front-end engineering generation method, which aims to solve the problem that developers need to manually write construction scripts during the low-code front-end engineering pipeline construction process. It schematically provides a low-code front-end engineering construction template based on the DevOps platform, supports low-code front-end engineering construction in multiple scenarios, accelerates the low-code development cycle, reduces errors in manual script editing, and provides a standardized construction solution for pipeline front-end engineering, ensuring consistency and repeatability.
[0028] Specifically, such as Figure 1 As shown, the following process is included: S101: Standardization of low-code front-end engineering construction process scripts: S101-1: The low-code front-end project construction steps include: online / offline compilation of PC front-end code; online / offline compilation of mobile front-end code; generation of front-end project metadata package; generation of front-end project resource files; compilation of front-end project Java code; extraction and packaging of all deployment files.
[0029] S101-2: Script the low-code front-end engineering construction steps, specifically including: Execution commands for the online compilation steps of the front-end code on the PC side (i.e., computer side); Execution commands for the offline compilation step of the front-end code on the PC side (i.e., computer side); Execution command for online compilation of mobile front-end code; Execution command for offline compilation of mobile front-end code; Generate the execution command of the front-end engineering metadata package step; Generate the execution command of the front-end engineering resource file step; Execution command for the Java code compilation step of the front-end project; Extract the execution command for the step of packaging all deployment files.
[0030] S101-3: Parameter variableization: Variableize the parameters that need to be changed in the command line of the above steps, configure the parameters through the pipeline template front-end interface, and when the back-end builds the pipeline execution script, the command script references the passed parameters in the form of environment variables.
[0031] The standardized scripts of the present invention have been fully tested and verified, reducing problems such as spelling errors and parameter setting errors that may occur due to manual writing of commands by developers, thereby reducing the risk of errors in the construction process and improving the stability and reliability of the construction process; the construction of all low-code front-end projects follows the same standardized script, ensuring the consistency and standardization of the construction process. No matter which developer is responsible for the construction, the same results can be obtained, which facilitates collaboration between team members and long-term maintenance of the project.
[0032] After standardizing various types of execution command scripts, the present invention can be centrally stored and managed. When a certain build step needs to be modified or optimized, it is only necessary to update the corresponding standardized script in one place, and all related low-code front-end engineering build processes will automatically benefit. There is no need to modify each project one by one, which reduces maintenance costs; standardized scripts have clear formats and specifications, which are convenient for recording and tracking the build process. Developers can more easily view the specific commands and parameters of each build step, quickly locate and solve problems, and improve the traceability and maintainability of the project.
[0033] Moreover, it should be noted that the script standardization of the present invention provides a solid foundation for subsequently determining the front-end project to be generated based on the project identifier and NPM cache identifier. Different project identifiers and NPM cache identifiers can be easily mapped to corresponding standardized scripts, making the project generation process more flexible and efficient; in complex low-code front-end projects, there may be a combination of multiple project types and compilation environments. Through script standardization, these complex situations can be easily dealt with, ensuring that no matter how the project requirements change, reasonable identifier settings and standardized script calls can be used to generate low-code front-end projects that meet the requirements.
[0034] It should be noted that the NPM cache identifier of the present invention plays an important role in low-code front-end project generation and DevOps pipeline. NPM cache is a local storage mechanism for storing downloaded packages. The cache mechanism can avoid repeated downloading of the same package, thereby saving time and network bandwidth. In the process of low-code front-end project generation, the NPM cache identifier can be used to quickly locate and reuse cached dependency packages, thereby accelerating the construction process of the front-end project. The NPM cache identifier is associated with project configuration, dependency version and other information, and is used to uniquely identify a dependency package or a set of dependency packages in the cache. In the pipeline, the NPM cache identifier can be used to determine whether the dependency package required by the current project already exists in the cache, thereby deciding whether it needs to be downloaded from the remote warehouse. In offline compilation scenarios, the NPM cache flag is particularly important. Through the NPM cache flag, the pipeline can accurately extract the required dependency packages from the local cache for offline compilation and building, avoiding build interruptions or failures caused by network problems; the NPM cache flag also helps to ensure cache consistency. When the dependency package version is updated, updating the NPM cache flag can ensure that the pipeline uses the latest version of the dependency package for building, avoiding build problems caused by old versions of the dependency package in the cache.
[0035] S102: The low-code front-end engineering pipeline build template is parameterized and user-friendly. This user-friendly interface makes the build process more intuitive and easier to understand. Developers can easily configure build parameters through a graphical interface without having to delve into the underlying commands and scripts, reducing the complexity of the build process.
[0036] The pipeline module based on the DevOps platform provides a low-code front-end project construction template. The template parameters include: PC project ID, mobile project ID, front-end project path, package version, warehouse name, Maven configuration address, NPM cache ID, PC package.json path, and mobile package.json path.
[0037] By parameterizing the pipeline low-code front-end engineering construction template, developers can quickly configure corresponding parameters (such as computer-side project identifier, mobile-side project identifier, etc.) according to different project requirements without having to write the build script from scratch each time. This greatly shortens the project startup and build time and improves development efficiency; parameterized templates can flexibly adapt to different project types (computer-side, mobile-side), different project configurations (front-end engineering path, package version, etc.) and different environment settings (Maven configuration address, NPM cache identifier, etc.), making the build process more universal and flexible.
[0038] The parameterized and user-friendly construction templates of the present invention reduce the need for manual input and configuration, thereby reducing the risk of build failures or configuration errors due to human error. Furthermore, the parameter verification and error prompt functions in the templates can help developers promptly identify and correct problems. Through parameterized and user-friendly construction templates, team members can follow the same construction standards and processes, ensuring consistency and repeatability across different projects, which helps improve the overall efficiency and quality of the team's collaboration. Parameterized construction templates can be centrally stored and managed, and when the construction process needs to be modified or updated, it only needs to be modified at the template level, without having to update each project individually. This reduces maintenance costs and improves the maintainability of the construction process.
[0039] S103: The pipeline module of the DevOps platform builds a low-code front-end engineering execution script based on the passed parameters. Specifically, it includes: S103-1: When the PC-side project identifier is TRUE (i.e., true) and the NPM cache identifier is offline, the pipeline module splices the execution command script of the PC-side (i.e., computer-side) front-end code offline compilation step. More specifically, it includes: locating the computer-side source code directory according to the front-end project path; confirming the dependency configuration through the computer-side package.json path; and calling the local cache path to perform offline compilation according to the computer-side source code directory and the dependency configuration.
[0040] In the offline compilation scenario, the local cache path is called to perform compilation according to the source code directory and dependency configuration on the computer or mobile terminal. This method makes full use of the local cache resources, avoiding the build interruption caused by dependency download failure in an unstable network or no network environment. At the same time, it reduces the time consumption of repeated dependency downloads and improves the build efficiency in the offline environment. Moreover, the locally cached dependency packages can be reused multiple times, reducing the network bandwidth cost and time cost caused by frequent dependency downloads. It is especially suitable for project development that requires frequent builds or is in a network-restricted environment.
[0041] S103-2: When the PC project identifier is TRUE and the NPM cache identifier is online, the pipeline module splices the execution command script of the PC front-end code online compilation step. More specifically, it includes: directly executing online dependency download and compilation through the front-end project path and the computer package.json path.
[0042] For online compilation scenarios, online dependency download and compilation are performed directly through the front-end project path and the corresponding package.json path. This method can obtain the latest dependency package versions in a timely manner, ensuring that the project can use the latest functions and security patches, improving the project's maintainability and security. Online compilation can quickly respond to updates of dependency packages and meet the needs of rapid project iteration. Developers do not need to manually manage dependency package versions. They only need to specify the required dependencies in package.json to automatically complete the download and compilation process, greatly simplifying the development process.
[0043] S103-3: When the mobile project identifier is TRUE and the NPM cache identifier is offline, the pipeline module splices the execution command script of the mobile front-end code offline compilation step. More specifically, it includes: locating the mobile source code directory according to the front-end project path; confirming the dependency configuration through the mobile package.json path; calling the local cache path to perform offline compilation according to the mobile source code directory and the dependency configuration.
[0044] S103-4: When the mobile project flag is TRUE and the NPM cache flag is online, the pipeline module splices the execution command script of the mobile front-end code online compilation step, more specifically, including: directly executing online dependency download and compilation through the front-end project path and the computer package.json path.
[0045] S103-5: The execution command script of the pipeline module splicing step to generate the front-end engineering metadata package, more specifically, including: extracting metadata from the front-end engineering path, associating the metadata with the warehouse name, and generating a standardized description file.
[0046] S103-6: The execution command script of the pipeline module splicing step to generate the front-end engineering resource file, specifically including: locating static resources according to the front-end engineering path, and marking the version number of the resources in combination with the package version.
[0047] S103-7: The pipeline module splices the execution command script of the front-end engineering Java code compilation step, specifically including: specifying a private warehouse or mirror configuration through the Maven configuration address, and injecting the package version into the Maven build parameter.
[0048] S103-8: The pipeline module splices, extracts, and packages the execution command script for all deployment file steps. Specifically, it includes: collecting compilation products from the build directory under the front-end project path, naming the deployment package in the format of "warehouse name-package version" to ensure version traceability.
[0049] The present invention accurately locates the computer-side source code directory through the front-end engineering path, ensuring that subsequent compilation operations can accurately act on the target code, avoiding misoperation of irrelevant files, and improving the accuracy and efficiency of the build; the package.json path of the computer or mobile terminal is used to confirm the dependency configuration. The package.json records in detail the various dependency packages required for the project and their version information, providing a clear basis for subsequent dependency downloading and compilation, and ensuring the integrity and consistency of the project dependencies.
[0050] Whether compiling offline or online, the solution automates the build process by splicing together execution command scripts. Developers no longer need to manually write complex compilation commands. Simply selecting the appropriate compilation method based on project requirements automatically generates the corresponding execution command script, improving development efficiency. The unified build process and script splicing rules ensure consistency and repeatability across different projects and developers, facilitating team collaboration and project maintenance. It also provides a solid foundation for subsequent continuous integration and continuous deployment (CI / CD).
[0051] Specifically, the template parameters used in the above steps and the specific parameter usage instructions are shown in Table 1.
[0052] Table 1: Template parameters and instructions.
[0053]
[0054] Figure 2 A low-code front-end engineering generation system provided by an exemplary embodiment of the present invention is shown, including: The first splicing unit 201 is configured to: determine the front-end project to be generated according to the project identifier and the NPM cache identifier, and then splice the execution command script corresponding to the front-end project; The second splicing unit 202 is configured to: splice the execution command script of the step of generating the front-end engineering metadata package; The third splicing unit 203 is configured to: splice the execution command script of the step of generating the front-end engineering resource file; The fourth splicing unit 204 is configured to: splice the execution command script of the Java code compilation step of the front-end project; The fifth splicing unit 205 is configured to: splice and extract the execution command scripts of the steps of packaging all deployment files to generate the front-end project that needs to be generated.
[0055] It is understandable that each of the above-mentioned units can be separately or completely combined into one or several other units to constitute, or one (or some) of the units can be further divided into multiple functionally smaller units to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the system may also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0056] According to another embodiment of the present application, the system described in this embodiment can be constructed and the low-code front-end engineering generation method of the present application can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method described in Example 1 on a general-purpose computing device such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.
[0057] Figure 3 An electronic device provided by an exemplary embodiment of the present invention is shown, and the electronic device includes a processor 301, a communication interface 302, and a computer-readable storage medium 303. The processor 301, the communication interface 302, and the computer-readable storage medium 303 may be connected via a bus or other means.
[0058] Among them, the communication interface 302 is used to receive and send data, the computer-readable storage medium 303 can be stored in the memory of the electronic device, the computer-readable storage medium 303 is used to store computer programs, the computer programs include program instructions, and the processor 301 is used to execute the program instructions stored in the computer-readable storage medium 303.
[0059] The processor 301 (also called CPU (Central Processing Unit)) is the computing core and control core of the electronic device, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement corresponding method processes or corresponding functions.
[0060] The processor 301 is configured to perform the following process: Determine the front-end project that needs to be generated based on the project identifier and the NPM cache identifier, and then splice the execution command script corresponding to the front-end project; splice the execution command script of the step of generating the front-end project metadata package; splice the execution command script of the step of generating the front-end project resource file; splice the execution command script of the step of compiling the Java code of the front-end project; splice the execution command script of the step of extracting and packaging all deployment files to generate the front-end project that needs to be generated.
[0061] The present invention also provides a computer-readable storage medium (Memory). This computer-readable storage medium is a memory device in an electronic device for storing programs and data. It should be understood that the computer-readable storage medium herein may include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The computer-readable storage medium provides storage space that stores the processing system of the electronic device.
[0062] Furthermore, the storage space also stores one or more instructions suitable for being loaded and executed by the processor. These instructions may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium herein may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device; alternatively, it may be at least one computer-readable storage medium located remotely from the processor.
[0063] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer-readable storage medium to implement the following process: Determine the front-end project that needs to be generated based on the project identifier and the NPM cache identifier, and then splice the execution command script corresponding to the front-end project; splice the execution command script of the step of generating the front-end project metadata package; splice the execution command script of the step of generating the front-end project resource file; splice the execution command script of the step of compiling the Java code of the front-end project; splice the execution command script of the step of extracting and packaging all deployment files to generate the front-end project that needs to be generated.
[0064] Those skilled in the art will appreciate that the units and algorithmic steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0065] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data processing device such as a server or data center that integrates one or more available media. Available media can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive (SSD)).
[0066] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A low-code front-end engineering generation method, characterized in that: The following processes are included: Determine the front-end project to be generated based on the project identifier and the NPM cache identifier, and then splice the execution command script corresponding to the front-end project; Splice and generate the execution command script for the front-end engineering metadata package step; Splice and generate the execution command script for the front-end engineering resource file steps; Splice the execution command script of the front-end engineering code compilation steps; Splice and extract the execution command scripts of all deployment file steps to generate the front-end project that needs to be generated.
2. The low-code front-end engineering generation method according to claim 1, characterized in that: Based on the project ID and NPM cache ID, determine the front-end project to be generated, and then splice the execution command script corresponding to the front-end project, including: When the NPM cache flag is offline and the computer project flag is true, the execution command script of the offline compilation step of the computer front-end code is spliced; When the NPM cache flag is online and the computer-side project flag is true, the execution command script for the online compilation step of the computer-side front-end code is spliced; When the NPM cache flag is offline and the mobile project flag is true, the execution command script for the offline compilation step of the mobile front-end code is spliced; When the NPM cache flag is online and the mobile project flag is true, the execution command script for the online compilation step of the mobile front-end code is spliced.
3. The low-code front-end engineering generation method according to claim 1 or 2, characterized in that: Before determining the front-end project to be generated based on the project identifier and NPM cache identifier, the script standardization of the low-code front-end project construction process is also included: Standardize the execution command script for the online compilation steps of the front-end code on the computer side; Standardize the execution command script for the offline compilation steps of the front-end code on the computer side; Standardize the execution command script for the online compilation steps of mobile front-end code; Standardize the execution command script for offline compilation of mobile front-end code; Standardize the execution command scripts of the front-end engineering metadata package steps; Standardize the execution command scripts of front-end engineering resource file steps; Standardize the execution command script for the front-end engineering code compilation steps; Standardize the execution command script for extracting and packaging all deployment files.
4. The low-code front-end engineering generation method according to claim 3, characterized in that: Variable the parameters that need to be changed in the command line of the standardized steps, configure the variable parameters through the pipeline template front-end interface, and when the back-end builds the pipeline to execute the script, the command script references the passed parameters in the form of environment variables.
5. The low-code front-end engineering generation method according to claim 2, characterized in that: Use the pipeline low-code front-end engineering construction template, splice the execution command script corresponding to the front-end engineering, and parameterize and interface the pipeline low-code front-end engineering construction template, including: The parameters of the pipeline low-code front-end engineering construction template include: computer-side project ID, mobile-side project ID, front-end engineering path, package version, warehouse name, Maven configuration address, NPM cache ID, computer-side package.json path, and mobile-side package.json path.
6. The low-code front-end engineering generation method according to claim 5, characterized in that: The execution command script for the offline compilation step of the computer-side front-end code is assembled, including: locating the computer-side source code directory according to the front-end project path; confirming the dependency configuration through the computer-side package.json path; calling the local cache path to perform offline compilation based on the computer-side source code directory and the dependency configuration; Splice the execution command script of the computer-side front-end code online compilation steps, including: directly executing online dependency download and compilation through the front-end project path and the computer-side package.json path; Splice the execution command script for the offline compilation steps of the mobile front-end code, including: locating the mobile source code directory according to the front-end project path; confirming the dependency configuration through the mobile package.json path; calling the local cache path to perform offline compilation based on the mobile source code directory and the dependency configuration; Splice the execution command script of the online compilation steps of the mobile front-end code, including: directly executing online dependency download and compilation through the front-end project path and the computer package.json path.
7. The low-code front-end engineering generation method according to claim 5, characterized in that: The execution command script for the steps of splicing and generating the front-end engineering metadata package includes: extracting metadata from the front-end engineering path, associating the metadata with the warehouse name, and generating a standardized description file; The execution command script for the steps of splicing and generating front-end engineering resource files includes: locating static resources according to the front-end engineering path, and marking the resource version numbers in combination with the package version; Splice the execution command script of the front-end engineering code compilation step, including: specifying the private warehouse or mirror configuration through the Maven configuration address, and injecting the package version into the Maven build parameters.
8. A low-code front-end engineering generation system, characterized by: include: The first splicing unit is configured to: determine the front-end project to be generated according to the project identifier and the NPM cache identifier, and then splice the execution command script corresponding to the front-end project; The second splicing unit is configured to: splice the execution command script of the step of generating the front-end engineering metadata package; The third splicing unit is configured to: splice the execution command script of the step of generating the front-end engineering resource file; The fourth splicing unit is configured to: splice the execution command script of the Java code compilation step of the front-end project; The fifth splicing unit is configured to: splice and extract the execution command scripts of the steps of packaging all deployment files to generate the front-end project that needs to be generated.
9. A computer device, characterized in that: include: a processor and a computer-readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the low-code front-end engineering generation method as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded by a processor and executing the low-code front-end engineering generation method as described in any one of claims 1 to 7.