CN109739478B - Front-end project automatic construction method and device, storage medium and electronic equipment - Google Patents

Front-end project automatic construction method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN109739478B
CN109739478B CN201811582913.3A CN201811582913A CN109739478B CN 109739478 B CN109739478 B CN 109739478B CN 201811582913 A CN201811582913 A CN 201811582913A CN 109739478 B CN109739478 B CN 109739478B
Authority
CN
China
Prior art keywords
code
construction
end project
file
dependency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811582913.3A
Other languages
Chinese (zh)
Other versions
CN109739478A (en
Inventor
杨泽伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811582913.3A priority Critical patent/CN109739478B/en
Publication of CN109739478A publication Critical patent/CN109739478A/en
Application granted granted Critical
Publication of CN109739478B publication Critical patent/CN109739478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a front-end project automatic construction method, a front-end project automatic construction device, a computer readable storage medium and electronic equipment, wherein the method comprises the following steps: generating a configuration file according to the interactive question and answer result; generating code dependence according to the configuration file; and acquiring a service code, and processing the service code according to the code dependence so as to finish the automatic construction of the front-end project. The technical scheme of the invention not only can realize the automatic execution of the construction process of the front-end project, but also can improve the construction speed of the front-end project and the development efficiency of developers.

Description

Front-end project automatic construction method and device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of front-end development, in particular to a front-end project automatic construction method, a front-end project automatic construction device, a computer-readable storage medium and electronic equipment.
Background
With the rapid development of the front-end technology, the business logic and the interaction effect of the front-end project become more and more complex, meanwhile, the form and the module of the front-end project become diversified, the front-end project needs to be maintained and iterated continuously, and the management difficulty and the development difficulty of the project are increased. Therefore, how to simplify the front-end development steps and realize the automatic construction of the front-end project becomes a focus of attention of related personnel.
In the prior art, developers of front-end projects need to concentrate on writing development service codes during development, and meanwhile, normal operation of the construction process needs to be guaranteed by writing construction codes, so that the development steps are complicated, and the efficiency is low.
Therefore, the efficiency of the front-end project automation construction method in the prior art needs to be improved.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a front-end project automation construction method, a front-end project automation construction device, a storage medium and electronic equipment, and further overcomes the defects of complex construction process and low efficiency of the front-end project automation construction method in the prior art at least to a certain extent.
Additional features and advantages of the invention will be set forth in the detailed description which follows, or may be learned by practice of the invention.
According to a first aspect of the embodiments of the present invention, there is provided a front-end project automation construction method, including: generating a configuration file according to the interactive question and answer result; constructing and generating code dependence according to the configuration file; and acquiring a service code, and processing the service code according to the code dependence so as to finish the automatic construction of the front-end project.
In some embodiments of the present invention, based on the foregoing solution, the generating a configuration file according to an interactive question-answering result includes: determining a construction frame according to the first interactive question-answering result; determining a construction template according to a second interactive question and answer result based on the construction framework; and generating a configuration file based on the construction template.
In some embodiments of the present invention, based on the foregoing solution, determining a construction template according to the second interactive question-answering result based on the construction framework includes: determining a frame dependency of the construction frame according to the construction frame; and determining the construction template according to the second interactive question and answer result under the frame dependence.
In some embodiments of the present invention, based on the foregoing solution, the generating a code dependency according to the configuration file includes: and performing dependency separation on the configuration file based on a packet manager to obtain a constructed code dependency.
In some embodiments of the present invention, based on the foregoing scheme, the processing the service code according to the code dependency includes: according to the code dependence, the service code is segmented to generate a segmented code; merging the module files corresponding to the segmentation codes to generate a merged code file; and compressing the merged code file to generate an output code file.
In some embodiments of the present invention, based on the foregoing scheme, the method further comprises: and determining a configuration environment according to the third interactive question-answering result.
In some embodiments of the present invention, based on the foregoing solution, it is determined that the configuration environment is a development environment, and the method further includes: when a new service code is acquired, detecting whether the code dependence is constructed; and when the code dependence construction is completed, automatically constructing the new service code again, and outputting a construction result.
In some embodiments of the present invention, based on the foregoing, it is determined that the configuration environment is a test environment or a production environment, and the method further comprises: and determining whether to pack and output the output code file according to a fourth interactive question-answering result.
According to a second aspect of the embodiments of the present invention, there is provided a front-end project automation building apparatus, including: the configuration module is used for generating a configuration file according to the interactive question and answer result; the construction module is used for generating code dependence according to the configuration file; and the processing module is used for acquiring the service code and processing the service code according to the code dependence so as to finish the automatic construction.
According to a third aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the front-end project automation building method according to the first aspect of the embodiments.
According to a fourth aspect of embodiments of the present invention, there is provided an electronic apparatus, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method for building a front-end project automatically as described in the first aspect of the embodiments above.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the technical solutions provided in some embodiments of the present invention, on one hand, the generation speed of the configuration file can be increased by generating the configuration file according to the interactive question and answer result; furthermore, code dependence is generated according to the configuration file, so that developers only need to concentrate on writing of business codes, energy is not consumed in the project construction process, development steps are simplified, and the project development difficulty is reduced; on the other hand, the service code is obtained and processed according to the code dependence so as to complete the automatic construction of the front-end project, and the error rate of code execution can be reduced, so that the development efficiency of developers is effectively improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 schematically illustrates a flow diagram of a front-end project automation building method according to an embodiment of the invention;
FIG. 2 schematically illustrates a flow diagram of a front-end project automation building method according to another embodiment of the invention;
FIG. 3 schematically illustrates a flow diagram of a front-end project automation construction method according to yet another embodiment of the invention;
FIG. 4 schematically illustrates a flow diagram of a front-end project automation building method according to yet another embodiment of the present invention;
FIG. 5 schematically illustrates a block diagram of a front-end project automation building apparatus according to an embodiment of the present invention;
FIG. 6 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In the prior art, developers of front-end projects need to concentrate on compiling development service codes and also need to compile construction codes to ensure normal operation of construction steps in the development process, so that the steps are complicated, the error rate of the developers is high, the efficiency is low, and the overall operation performance of the projects is poor. Therefore, the front-end project cannot be effectively constructed by adopting the automatic construction method of the front-end project in the prior art, and the efficiency of the front-end project needs to be improved.
In this embodiment, a front-end project automation construction method is provided first, which overcomes at least to some extent the defects of complex and complicated construction process and low efficiency of the front-end project automation construction method provided in the prior art.
Fig. 1 schematically shows a flow chart of a front-end project automation building method according to an embodiment of the present invention, and an execution subject of the front-end project automation building method may be a server for automatically building a front-end project.
Referring to fig. 1, a front-end project automation building method according to an embodiment of the present invention includes the following steps:
step S110, generating a configuration file according to the interactive question and answer result;
step S120, generating code dependence according to the configuration file;
step S130, acquiring a service code, and processing the service code according to the code dependence so as to complete the automatic construction of the front-end project.
In the technical solution provided in the embodiment shown in fig. 1, on one hand, the generation speed of the configuration file can be increased by generating the configuration file according to the interactive question-answering result; furthermore, code dependence is generated according to the configuration file, so that developers only need to concentrate on writing of business codes, energy is not consumed in the project construction process, development steps are simplified, and the project development difficulty is reduced; on the other hand, the service code is obtained and processed according to the code dependence so as to complete the automatic construction of the front-end project, and the error rate of code execution can be reduced, so that the development efficiency of developers is effectively improved.
The following describes the specific implementation of each step in fig. 1 in detail:
in step S110, a configuration file is generated according to the interactive question and answer result.
In an exemplary embodiment, the interactive question answering is an information processing mode with interaction between a developer and a server, and the processing process can be that the developer inputs information and an operation command through the server, the server immediately processes the information and the operation command after receiving the information, and an interactive question answering result is displayed through terminal equipment; the server can also display the current selectable interactive questions and answers through the terminal equipment, and developers click or touch to determine interactive question and answer results. The specific implementation of the interactive question answering can be set according to the actual situation, and belongs to the protection scope of the invention. The interactive question and answer processing mode has the advantages of flexibility, intuition and convenience in control, development time can be saved, and development efficiency of developers can be improved.
In an exemplary embodiment, a configuration file may be generated based on interactive question and answer results with a developer.
In an exemplary embodiment, fig. 2 schematically shows a flowchart of a front-end project automation building method according to another embodiment of the present invention, specifically shows a flowchart of generating a configuration file according to an interactive question and answer result, and step S110 is explained below with reference to fig. 2.
In step S201, a building framework is determined according to the first interactive question and answer result.
In an exemplary embodiment, the building framework refers to a framework for simplifying a web page design, such as jquery, extjs, bootstrap, and the like, and specific functions, such as html (HyperText Markup Language) document operation, various beautiful controls (buttons, forms, and the like), are encapsulated in the framework, and the use of the building framework can reduce an interface development period and improve the aesthetic property of the interface.
In an exemplary embodiment, the invention at least integrates an Angular frame, a read frame and a Vue frame, a developer can select the dependency of the corresponding frame through a first interactive question and answer command and automatically install the dependency, the dependency can be directly used after installation, if other third party dependencies need to be added, the dependency can be installed by itself, and the dependency can be imported and used through an ESM (ECMA Script Module, an ES standard Module, which has universality and is convenient for third party Module compatibility and packaging). The Angular frame is a Javascript frame based on TypeScript (Javascript superset), the read frame is a JavaScript library used for constructing a user interface, and Vue is an MVVM (Model-View-ViewModel, abbreviated as MVVM) frame used for constructing an intuitive, quick and modular interactive interface.
In step S202, a building template is determined according to the second interactive question and answer result based on the building framework.
In an exemplary embodiment, after determining the build framework, a build template needs to be determined based on the second interactive question-and-answer result.
In an exemplary embodiment, fig. 3 schematically shows a flowchart of a front-end project automation building method according to still another embodiment of the present invention, and specifically shows a flowchart of determining a building template according to a second interactive question-and-answer result based on the building framework, and step S202 is explained below with reference to fig. 3.
In step S301, a framework dependency is determined from the build framework.
In an exemplary embodiment, after determining the building frame, it is necessary to further determine the frame dependency corresponding to the building frame, that is, determine the building code related to the building frame.
In step S302, the building template is determined according to the second interactive question-answering result in the framework dependency.
In an exemplary embodiment, after determining the frame dependency according to the building frame, the building template needs to be determined according to the second interactive question and answer result under the frame dependency.
In an exemplary embodiment, the nature of the construction template is that the character string of the function can be converted, and the function can be put into an object full of data by using the construction template and then restored to a completely new character string. The invention at least integrates three templates of SPA (Single Page Application, SPA for short), MPA (Multi-Page Application, MPA for short) and PWA (Progressive Web Application, PWA for short).
In an exemplary embodiment, after determining the building template, determining a configuration environment according to the third interactive question and answer result, where the configuration environment may be a development environment, a test environment, or a production environment; the development environment is used for the construction process, i.e. the process before the code file is output. When the test environment or the production environment is used for the construction of the front-end project, the output code file is obtained, and then the output code file can be tested or released and applied in the test environment or the production environment.
In step S203, a configuration file is generated based on the build template.
In an exemplary embodiment, the configuration file corresponds to a combination file of a construction frame and a construction code corresponding to the construction of a template in the construction process of a front-end project, and the configuration file further comprises a construction code dependency, a service code dependency and a third party dependency which is automatically imported by other developers according to needs. After determining the build framework and the build templates described above, the developer can apply to other templates in the project, such as: and carrying out appropriate selection and collocation on the project directory template, the page routing template, the state management template and the framework component template so as to generate a configuration file required by a developer.
In step S120, a code dependency is generated from the configuration file.
In an exemplary embodiment, after obtaining the configuration file, the dependencies included in the configuration file need to be separated based on the npm package manager (npm package is a module manager of nodjs) to generate a build code dependency, a business code dependency, and other third-party dependencies, where the build code dependency may be used in a process of processing the build code, the business code dependency may be used in a process of processing the business code, and the third-party dependencies may be used in other development-required processes of developers.
In step S130, a service code is obtained, and the service code is processed according to the code dependency, so as to complete the automated construction of the front-end project.
In an exemplary embodiment, after generating the code dependency, the service code may be acquired, and then the service code is processed according to the service code dependency in the code dependency.
In an exemplary embodiment, fig. 4 schematically shows a flowchart of a front-end project automation building method according to another embodiment of the present invention, specifically shows a flowchart of processing the business code according to the code dependency, and the following explains step S130 with reference to fig. 4.
In step S401, the service code is divided according to the code dependency, and a division code is generated.
In the exemplary embodiment, the service code needs to be checked and converted first. The code verification is carried out to verify the code input correctness and solve the problem that the code writing habit and the logic writing style of developers are inconsistent. The invention at least integrates Styletint (CSS verification) and Escript (JS verification) verification tools, can achieve the effects of unifying code style and ensuring code uniformity while checking code accuracy through code verification, is convenient for developers to correct some code errors in time, and quickly starts and reads codes.
In an exemplary embodiment, after the service code is checked, since a plurality of code writing standards and syntax standards are developed at the front end nowadays, but most of the standards cannot be directly run under most browsers, the invention integrates at least Sass (CSS preprocessing), babel (JS compiling) and TypeScript (JS extension), and can convert the checked service code into the service code which can be analyzed and recognized by the current browser. Through code conversion, the structure of the service code is clear at a glance, and the maintainability of the service code is enhanced.
In an exemplary embodiment, the service codes after verification and conversion correspond to different code dependencies based on different code types, and the service codes can be segmented according to the code dependencies to generate segmented codes. The purpose of code segmentation is to separate various service codes contained in the service code, for example: the service code can contain an HTML code, a CSS code and a JS code; illustratively, the service code may be divided into a corresponding HTML module file, CSS module file, and JS module file, either synchronously or asynchronously.
In step S402, the module files corresponding to the split codes are merged to generate a merged code file.
In an exemplary embodiment, the module files corresponding to the split codes are merged to generate a merged code file, that is, the corresponding HTML module file, CSS module file, and JS module file are merged to generate a merged code file. By combining the module files, the HTML entry files are beneficial to reducing the number of requests depending on the files in subsequent code processing, so that fewer files can be loaded, the loading speed and the rendering speed are increased, and the running performance is improved.
In step S403, the merged code file is compressed to generate an output code file.
In an exemplary embodiment, after the merged code file is obtained, the file is large in size, and if the merged code file is directly packaged and output, debugging codes written by developers in the development process and other codes written unintentionally are packaged, so that the memory occupation of the output code file is too large, and the system operation performance is reduced. Therefore, the invention at least integrates the compression of Purifycss (CSS compression), uglifyjs (JS compression), imagemin (image compression), fontspider (font compression) and Gzip (GNUzip, the abbreviation of GNUzip is used for file compression of UNIX system), and can call one or more compression methods according to actual needs to compress and combine images and fonts and remove useless and repeated codes so as to achieve the technical effects of reducing the volume and resource occupation of an output code file, maximizing the output of a file with the minimum volume and improving the running performance of a front-end project.
In an exemplary embodiment, in a development environment, when a new service code is acquired again, whether the code dependency is constructed needs to be detected; and when the code dependence construction is completed, automatically constructing the acquired new service code again, and outputting a construction result to obtain an output code file.
In an exemplary embodiment, after the output code file is obtained, whether the configuration environment is converted into the test environment or the production environment may be determined according to a third interactive question and answer result, and after the test environment or the production environment is entered, a fourth interactive question and answer may be performed with a developer to obtain a fourth interactive question and answer result, so as to determine whether the obtained output code file is packaged, output and issued. Thus, the rapid issue of the output code file can be realized, thereby simplifying the issue flow.
The following describes an embodiment of the apparatus of the present invention, which can be used to implement the above-mentioned automatic building method of front-end project of the present invention.
Fig. 5 schematically shows a block diagram of a front-end project automation building apparatus according to an embodiment of the present invention, which may be provided in a server for automatically building a front-end project.
Referring to FIG. 5, a block diagram 500 of a front-end project automation building apparatus according to an embodiment of the invention includes the following modules: a configuration module 501, a construction module 502, and a processing module 503, which are described in detail below:
and the configuration module 501 is configured to generate a configuration file according to the interactive question-answering result.
In an exemplary embodiment, the configuration module is configured to determine a build framework based on the first interactive question and answer result; determining a construction template according to a second interactive question and answer result based on the construction framework; and generating a configuration file based on the construction template.
A building module 502, configured to generate a code dependency according to the configuration file.
In an exemplary embodiment, the building module is configured to obtain the code dependency based on a dependency separation performed by the package manager on the configuration file.
The processing module 503 is configured to acquire a service code, and process the service code according to the code dependency, so as to complete automated construction of the front-end project.
In an exemplary embodiment, the processing module is configured to segment the service code according to the code dependency to generate a segmented code; merging the module files corresponding to the segmentation codes to generate a merged code file; and compressing the merged code file to generate an output code file. To complete the automated construction of the front-end project.
For details that are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the above-described embodiment of the front-end project automation building method of the present invention for the functional modules of the front-end project automation building apparatus of the present invention correspond to the steps of the above-described embodiment of the front-end project automation building method.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use with the electronic device implementing an embodiment of the present invention. The computer system 600 of the electronic device shown in fig. 6 is only an example, and should not bring any limitation to the function and the scope of the use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for system operation are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, the processes described above with reference to the flowcharts may be implemented as a computer software program according to an embodiment of the present invention. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may be separate and not incorporated into the electronic device. The computer readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is enabled to implement the front-end project automation building method in the embodiment.
For example, the electronic device may implement the following as shown in fig. 1: step S110, generating a configuration file according to the interactive question and answer result; step S120, generating code dependence according to the configuration file; step S130, acquiring a service code, and processing the service code according to the code dependence so as to complete the automatic construction of the front-end project.
As another example, the electronic device may implement the steps shown in any of fig. 2-4.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (7)

1. A front-end project automatic construction method is characterized by comprising the following steps:
determining a construction frame according to the first interactive question-answering result; the construction frame is a frame for simplifying webpage design; determining a framework dependency according to the construction framework; determining a construction template according to a second interactive question and answer result under the frame dependence; generating a configuration file based on the construction template; the construction template is used for converting the function into a character string;
performing dependency separation on the configuration file based on a packet manager to obtain code dependency;
acquiring a service code, and segmenting the service code according to the code dependence to generate a segmentation code;
merging the module files corresponding to the segmentation codes to generate a merged code file;
and compressing the merged code file to generate an output code file so as to finish the automatic construction of the front-end project.
2. The method of claim 1, wherein after the generating an output code file to complete automated building of the front-end project, the method further comprises:
and determining a configuration environment according to the third interactive question-answering result.
3. The method of claim 2, wherein the configuration environment is determined to be a development environment, the method further comprising:
when a new service code is acquired, detecting whether the code dependence is constructed;
and when the code dependence construction is completed, automatically constructing the new service code again, and outputting a construction result.
4. The method of claim 2, wherein the configuration environment is determined to be a test environment or a production environment, the method further comprising:
and determining whether to pack and output the output code file according to a fourth interactive question-answering result.
5. An automated front-end project building apparatus, comprising:
the configuration module is used for determining a construction frame according to the first interactive question-answering result; the construction frame is a frame for simplifying webpage design; determining a framework dependency according to the construction framework; determining a construction template according to a second interactive question and answer result under the frame dependence; generating a configuration file based on the construction template; the construction template is used for converting the function into a character string;
the construction module is used for carrying out dependency separation on the configuration file based on the package manager to obtain code dependency;
the processing module is used for acquiring a service code, and segmenting the service code according to the code dependence to generate a segmentation code;
merging the module files corresponding to the segmentation codes to generate a merged code file;
and compressing the merged code file to generate an output code file so as to complete the automatic construction.
6. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the front-end project automation building method according to any one of claims 1 to 4.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the front-end project automation building method of any one of claims 1 to 4.
CN201811582913.3A 2018-12-24 2018-12-24 Front-end project automatic construction method and device, storage medium and electronic equipment Active CN109739478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811582913.3A CN109739478B (en) 2018-12-24 2018-12-24 Front-end project automatic construction method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811582913.3A CN109739478B (en) 2018-12-24 2018-12-24 Front-end project automatic construction method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109739478A CN109739478A (en) 2019-05-10
CN109739478B true CN109739478B (en) 2022-12-06

Family

ID=66361032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811582913.3A Active CN109739478B (en) 2018-12-24 2018-12-24 Front-end project automatic construction method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109739478B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647320A (en) * 2019-08-14 2020-01-03 平安普惠企业管理有限公司 Project framework construction method and device, computer equipment and storage medium
CN110704101A (en) * 2019-09-06 2020-01-17 平安普惠企业管理有限公司 Code file construction method, device, equipment and computer readable storage medium
CN110659062B (en) * 2019-09-20 2023-09-29 贝壳技术有限公司 Front-end scaffold configuration method and device, readable storage medium and electronic equipment
CN110879702A (en) * 2019-11-21 2020-03-13 大唐网络有限公司 Method for realizing visual speech configuration in intelligent voice outbound system
CN113254019A (en) * 2020-02-10 2021-08-13 北京沃东天骏信息技术有限公司 Method and device for registering front-end data stream state file
CN111273898B (en) * 2020-02-25 2024-03-19 安徽以萨数据技术有限公司 Automatic construction method, system and storage medium for web front-end code
CN111562940B (en) * 2020-04-26 2024-02-27 北京金堤科技有限公司 Project data construction method and device
CN112162742A (en) * 2020-08-21 2021-01-01 长沙市到家悠享网络科技有限公司 Code deployment method, device and equipment
CN112099794A (en) * 2020-09-28 2020-12-18 中国银行股份有限公司 Front-end project construction method and device
CN112199080B (en) * 2020-09-28 2023-02-17 上海上讯信息技术股份有限公司 Webpack construction method and equipment for vuejs project
CN112346888A (en) * 2020-11-04 2021-02-09 网易(杭州)网络有限公司 Data communication method and device based on software application and server equipment
CN113312056B (en) * 2021-06-16 2022-04-19 浪潮云信息技术股份公司 Internationalization implementation method of angular large-scale integration project, electronic device and storage medium
US11681772B2 (en) 2021-08-13 2023-06-20 Capital One Services, Llc Systems, methods, and media enabling streamlined user experiences across progressive web applications
CN113608746B (en) * 2021-08-16 2023-10-27 北京字节跳动网络技术有限公司 Code conversion processing method, device, computer equipment and storage medium
CN114995801B (en) * 2022-05-18 2023-03-31 北京寄云鼎城科技有限公司 Visual application development method and system based on Internet of things platform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536744A (en) * 2014-12-19 2015-04-22 微梦创科网络科技(中国)有限公司 Method and server for automatically building and deploying codes
CN105956830A (en) * 2016-05-11 2016-09-21 中煤电气有限公司 J2EE framework based enterprise-level visualization application development platform

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2004264582B2 (en) * 2003-06-05 2010-05-13 Intertrust Technologies Corporation Interoperable systems and methods for peer-to-peer service orchestration
US7319868B2 (en) * 2004-09-27 2008-01-15 Telefonktiebolaget Lm Ericsson (Publ) Derivation of optimal antenna weights during soft handover
CN102637157B (en) * 2011-02-15 2014-12-03 郑磊 DTSOC (digital template system on chip)
CN103391213A (en) * 2012-05-11 2013-11-13 中兴通讯股份有限公司 Application deployment method, CPE (Customer Premises Equipment) and application deployment system
CN106502663A (en) * 2016-10-17 2017-03-15 成都知道创宇信息技术有限公司 A kind of front end project skeleton generating method
US10372507B2 (en) * 2016-12-31 2019-08-06 Intel Corporation Compute engine architecture to support data-parallel loops with reduction operations
CN106843869B (en) * 2017-01-16 2020-04-14 百融云创科技股份有限公司 Front-end development engineering system and method
CN107423053B (en) * 2017-06-15 2020-08-21 东莞理工学院 Web model packaging and distributed processing method for remote sensing image processing
CN108038241A (en) * 2018-03-01 2018-05-15 上海品顺信息科技有限公司 Integrated WEB visual workflows method, apparatus, readable storage medium storing program for executing and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536744A (en) * 2014-12-19 2015-04-22 微梦创科网络科技(中国)有限公司 Method and server for automatically building and deploying codes
CN105956830A (en) * 2016-05-11 2016-09-21 中煤电气有限公司 J2EE framework based enterprise-level visualization application development platform

Also Published As

Publication number Publication date
CN109739478A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
CN109739478B (en) Front-end project automatic construction method and device, storage medium and electronic equipment
CN112104709B (en) Intelligent contract processing method, device, medium and electronic equipment
CN110968305A (en) Applet visualization generation method, device, equipment and storage medium
CN111736840A (en) Compiling method and running method of applet, storage medium and electronic equipment
CN110389755B (en) Code processing method and device, electronic equipment and computer readable storage medium
CN110895471A (en) Installation package generation method, device, medium and electronic equipment
CN109828859B (en) Mobile terminal memory analysis method and device, storage medium and electronic equipment
CN110955409B (en) Method and device for creating resources on cloud platform
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
CN113900958A (en) Test case script generation method, system, medium and electronic device
CN109101294B (en) Data acquisition method, plug-in, electronic equipment and storage medium
CN114217789A (en) Function component expansion method, device, equipment, storage medium and program product
CN111367799A (en) Method, device, medium and electronic equipment for positioning source code breakdown position
CN113220374A (en) Software processing method and device
CN112416746A (en) Test case generation method, device, equipment and medium
CN110825622A (en) Software testing method, device, equipment and computer readable medium
CN111090821A (en) Method, device, electronic equipment and storage medium for realizing dynamic webpage
CN113885841A (en) Script generation method and device, electronic equipment and readable medium
CN111666201A (en) Regression testing method, device, medium and electronic equipment
CN114253537A (en) Form generation method and device, electronic equipment and storage medium
CN115269285A (en) Test method and device, equipment and computer readable storage medium
CN114077430A (en) Interface generation method and device, electronic equipment and storage medium
CN114791885A (en) Interface test method, device, equipment and medium
CN113918444A (en) Method, device, medium and electronic equipment for positioning collapse source code
CN113778451A (en) File loading method and device, computer system and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant