CN110413272B - Front-end project construction method, device, storage medium and equipment - Google Patents
Front-end project construction method, device, storage medium and equipment Download PDFInfo
- Publication number
- CN110413272B CN110413272B CN201910697468.3A CN201910697468A CN110413272B CN 110413272 B CN110413272 B CN 110413272B CN 201910697468 A CN201910697468 A CN 201910697468A CN 110413272 B CN110413272 B CN 110413272B
- Authority
- CN
- China
- Prior art keywords
- target
- configuration information
- construction
- page
- current
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention discloses a front-end project construction method, a front-end project construction device, a storage medium and equipment. Wherein the method comprises the following steps: determining a current target page in a target item to be constructed, merging sub-configuration information corresponding to the current target page to obtain target configuration information, wherein the sub-configuration information comprises public construction configuration information and private construction configuration information, and carrying out corresponding construction operation on the current target page according to the target configuration information. According to the technical scheme provided by the embodiment of the invention, the target pages in the target project do not need to be completely and commonly configured, personalized configuration of the target pages is realized through private construction configuration information, and the flexibility of the construction process of the multi-page application program project is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a front-end project construction method, a front-end project construction device, a storage medium and front-end project construction equipment.
Background
The front-end development comprises the process of creating a front-end interface such as a Web page and the like to be presented to a user, so that user interface interaction of the Internet product is realized. Web applications are applications that can be accessed through the Web, and currently Web page applications include single page applications (Single Page Application, SPA) and multi-page applications (MPA). SPA refers to that the whole Web application program has only one page, and the switching of the content is realized in a local update mode. MPA refers to a whole Web application program consisting of a plurality of pages, and switching of content is mainly achieved by switching different pages.
The current main stream front end framework is constructed by taking SPA project as a target, and in the actual service project, the service association among different pages in the project is less, the jump among the different pages is less, the purpose can be achieved by a user accessing one or a plurality of pages, and the project is more suitable for being realized by MPA. Currently, MPA also mainly adopts a front-end framework supporting SPA, and some developers continue to use the original building tool of SPA, so that in order to support multi-page building, two ways are often adopted to realize: first, all portals and templates are directly declared in the configuration; second, at build start-up, the portal and template pages are collected from the contracted directory and written into the configuration. In both schemes, only one set of configuration is adopted, so that the flexibility is poor and improvement is needed.
Disclosure of Invention
The embodiment of the invention provides a front-end project construction method, a device, a storage medium and equipment, which can solve the problem of poor flexibility in the construction process of multi-page application program projects in the prior art.
In a first aspect, an embodiment of the present invention provides a front-end project construction method, where the method includes:
determining a current target page in a target item to be constructed, wherein the target item comprises at least two target pages;
Merging sub configuration information corresponding to the current target page to obtain target configuration information, wherein the sub configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target item, and the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target item;
and carrying out corresponding construction operation on the current target page according to the target configuration information.
In a second aspect, an embodiment of the present invention provides a front-end project building apparatus, including:
the page determining module is used for determining a current target page in a target item to be constructed, wherein the target item comprises at least two target pages;
the configuration merging module is used for merging the sub-configuration information corresponding to the current target page to obtain target configuration information, wherein the sub-configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target item, and the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target item;
And the construction module is used for carrying out corresponding construction operation on the current target page according to the target configuration information.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements a front-end project construction method as provided by the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements a front-end project construction method as provided in the embodiment of the present invention when the processor executes the computer program.
In the front-end project construction scheme provided by the embodiment of the invention, in the construction process of a multi-page application project, a current target page in a target project to be constructed is determined, sub-configuration information corresponding to the current target page is combined to obtain target configuration information, wherein the sub-configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target project, the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target project, and corresponding construction operation is carried out on the current target page according to the target configuration information. By adopting the technical scheme, the target pages in the target project do not need to be completely and commonly configured, personalized configuration of the target pages is realized through private construction configuration information, and the flexibility of the construction process of the multi-page application program project is improved.
Drawings
FIG. 1 is a schematic flow chart of a front-end project construction method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a front-end project construction method according to a second embodiment of the present invention;
fig. 3 is a schematic flow chart of a front-end project construction method according to a third embodiment of the present invention;
fig. 4 is a schematic diagram of a file directory structure of a target item according to a third embodiment of the present invention;
fig. 5 is a schematic flow chart of a front-end project construction method according to a fourth embodiment of the present invention;
FIG. 6 is a block diagram of a front-end project building apparatus according to a fifth embodiment of the present invention;
fig. 7 is a block diagram of a computer device according to a seventh embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings. Furthermore, embodiments of the invention and features of the embodiments may be combined with each other without conflict.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts steps as a sequential process, many of the steps may be implemented in parallel, concurrently, or with other steps. Furthermore, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example 1
Fig. 1 is a schematic flow chart of a front-end project construction method according to an embodiment of the present invention, which may be performed by a front-end project construction apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a computer device. As shown in fig. 1, the method includes:
step 101, determining a current target page in a target item to be constructed, wherein the target item comprises at least two target pages.
By way of example, the items in the embodiments of the present invention may include a multi-page Web application, abbreviated as multi-page application or MPA, and the target item may be a multi-page application that is currently required to be built. The target page may include a page to be built by adopting the technical scheme of the embodiment of the invention in the target item, the target item includes a plurality of pages, and the target page may be all pages or part of pages included in the target item, that is, the target item may include other pages except for the target page, and other pages may be built by adopting the technical scheme of the embodiment of the invention, which is not particularly limited.
For example, the current target page may refer to a target page that needs to be constructed currently, and a construction order of each target page in the target item may be predefined, and the current target page is determined according to the construction order. Alternatively, the current target page may be determined in other manners, such as specified by a developer, and the embodiment of the present invention is not limited in detail.
By way of example, the embodiments of the present invention may employ a self-created build tool, or may be modified based on an existing build tool, such as a build tool of a Vue framework, vue weback, etc. Specific build tools embodiments of the invention are not limited.
And 102, merging the sub-configuration information corresponding to the current target page to obtain target configuration information.
The sub configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target project, and the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target project.
In the related art, when a Web application is built, an portal program and a template page are involved. An entry refers to the program that the application process first executes, and the front-end build tool often needs to indicate that the entry is working properly. SPA has a single main portal program, with MPA typically having one portal program per page. Template pages refer to templates that generate actual pages, with an SPA typically having only one template page and an MPA having multiple template pages. When an MPA project is constructed, a front end framework supporting the SPA is generally adopted, a developer continues to use an original construction tool of the SPA, in order to support multi-page construction, a manual mode of directly declaring all portals and templates in configuration is generally adopted, or an automatic mode of collecting the portals and the templates from a contracted catalog and writing the portals and the templates into the configuration is adopted when construction is started, the two modes have only one set of configuration, the flexibility is poor, in order to realize configuration differences among different pages, many condition judgment needs to be carried out in the configuration, along with the enlargement of the project, the construction configuration is more and more complicated, the development and construction efficiency is influenced, in addition, when the pages are added, the whole configuration is also required to be changed, and the construction flexibility and efficiency are further influenced.
In the embodiment of the invention, two parts of sub-configuration information are set for one target page, one part is construction configuration information shared by all target pages in the target item, and the embodiment of the invention is called public construction configuration information or basic construction configuration information, and the public construction configuration information is used when each target page is constructed. In addition, in order to ensure flexibility of project construction and meanwhile consider personalized difference of each target page, the other part is construction configuration information specific to other target pages in the target project compared with the current target page, which is called private construction configuration information in the embodiment of the invention, the corresponding private construction configuration information is needed in the construction process of the current target page, and the construction configuration information corresponding to the current target page is not needed in the construction process of other target pages. When the current target page needs to be constructed, the sub-configuration information corresponding to the current target page can be acquired and combined, or the sub-configuration information corresponding to the current target page acquired before can be directly combined to obtain the target configuration information corresponding to the current target page. The merging operation may be implemented through an existing function or interface in the construction tool, or may be implemented by writing a function for merging the sub-configuration information in the construction tool, which may be called a merging function, and inputting the sub-configuration information corresponding to the current target page into the merging function to obtain the target configuration information.
And 103, carrying out corresponding construction operation on the current target page according to the target configuration information.
For example, a construction instance of the current target page may be started, and the current target page may be constructed according to the target configuration information. Specifically, the target configuration information may be transferred into a preset construction function, so as to implement construction of the current target page. The preset build function may be understood as a build program, by which the corresponding build operation is automatically completed. The page template file, the portal file (and the portal program described above) and other source files or source codes corresponding to the current target page may also be involved in the construction process, and the embodiments of the present invention are not limited in detail.
In the front-end project construction method provided by the embodiment of the invention, in the construction process of a multi-page application program project, a current target page in a target project to be constructed is determined, sub-configuration information corresponding to the current target page is combined to obtain target configuration information, wherein the sub-configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target project, the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target project, and corresponding construction operation is carried out on the current target page according to the target configuration information. By adopting the technical scheme, the target pages in the target project do not need to be completely and commonly configured, personalized configuration of the target pages is realized through private construction configuration information, and the flexibility of the construction process of the multi-page application program project is improved.
On the basis of the embodiment, the method can be further optimized, the target pages are divided based on the target modules, and the private construction configuration information is further refined to comprise the module construction configuration information and the page construction configuration information, so that the flexibility of the multi-page application program project construction process is further improved, and the different-degree differentiation requirements can be met.
The target item includes at least two target modules, each target module includes at least two target pages, the private construction configuration information includes module construction configuration information and page construction configuration information, the module construction configuration information includes construction configuration information specific to a current target module compared with other target modules in the target item and common to all target pages in the current target module, and the page construction configuration information includes construction configuration information specific to the current target page compared with other target pages in the target module. A module may refer to a collection of pages belonging to the same category as belonging to a certain service. Based on the division of the modules, the pages can be organized according to the modules, the page structure is clear, the development and the construction are convenient. The target module may be a module to be built in the target project. For the target pages contained in one target module, the same category generally has partially same configuration, so that the embodiment of the invention can further extract the configuration information shared by all the target pages in the same target module, and the configuration information is used as module construction configuration information, and the rest configuration information required by one target page is used as the configuration information specific to the target page, which is called page construction configuration information. Therefore, the configuration information required for constructing one target page can be further divided, so that the flexibility of the multi-page application program project construction process is further improved, the different-degree differentiation requirements are met, the condition judgment that too many conditions are set in the configuration can be avoided, the configuration logic is simplified, and the development and construction efficiency is improved.
Fig. 2 is a schematic flow chart of a front-end project construction method according to a second embodiment of the present invention, where relevant steps such as obtaining configuration files corresponding to sub-configuration information are added by optimizing the front-end project construction method according to the above embodiment.
Illustratively, before determining the current target page in the target item to be constructed, the method further comprises: and acquiring configuration files corresponding to all the sub configuration information contained in the target item, and storing the configuration files in a file directory corresponding to the target item. Wherein, the configuration file can be written in the computer equipment by a developer, so that the computer equipment obtains the configuration file; the configuration file may also be a written file, and may be directly transferred into the computer device, for example, when the current target item is the same as the frame of another item, the configuration file of the other item may be directly transferred into the computer device, and in addition, the developer may be allowed to modify the transferred configuration file in the computer device, so as to obtain the configuration file for the current target item. The benefit of the improvements herein is that the sub-configuration information of the target page can be managed reasonably.
Further, before the merging of the sub-configuration information corresponding to the current target page, the method further includes: and reading the configuration file corresponding to the current target page to acquire the sub-configuration information corresponding to the current target page. The configuration method has the advantage that the sub configuration information corresponding to the target page can be acquired clearly and quickly. The embodiment of the invention does not limit the acquisition sequence of various sub-configuration information and the sequence relation with other steps, and can be set according to actual requirements.
Optionally, as shown in fig. 2, the method may include:
step 201, obtaining configuration files corresponding to all sub configuration information contained in a target item to be constructed, and storing the configuration files in a file directory corresponding to the target item.
By way of example, a configuration file may be pre-written and the written configuration file declared. The configuration files may include a public build configuration file, a module build configuration file, and a page build configuration file, corresponding to the public build configuration information, the module build configuration information, and the page build configuration information, respectively. Optionally, the public building configuration file may be stored under a root directory in a file directory corresponding to the target item, the module building configuration file may be stored under a folder of the target module, the folder of the target page is a subfolder of the folder of the target module, and the page building configuration file may be stored under the target page.
Step 202, reading the public construction configuration file to obtain public construction configuration information.
Step 203, determining a current target module, and reading a module construction configuration file corresponding to the current target module to obtain module construction configuration information.
Step 204, determining a current target page, and reading page construction configuration information corresponding to the current target page.
And step 205, merging the public construction configuration information, the module construction configuration information and the page construction configuration information to obtain target configuration information corresponding to the current target page.
Step 206, the target configuration information is transmitted into a preset construction function to realize construction of the current target page.
Optionally, the preset construction function is stored in a root directory of a file directory corresponding to the target item, so as to be shared by all target pages in the target item. The setting has the advantages that different modules and different pages can share the construction program, and personalized construction can be completed by transmitting configuration information of the page, so that the directory structure is simplified.
According to the front-end project construction method provided by the embodiment of the invention, the configuration information of the target page in the target project is divided into the public construction configuration information, the module construction configuration information and the page construction configuration information, and the configuration information, the module construction configuration information and the page construction configuration information are respectively pre-written and stored in the corresponding configuration files, so that the sub-configuration information of the target page can be reasonably managed, when the construction of the target page is required, the sub-configuration information is respectively and rapidly read from the corresponding configuration files, and the merging is carried out, the construction of the target page is completed by utilizing the merged target configuration information, the flexibility of the multi-page application project construction process can be effectively improved, and the development and construction efficiency is improved.
Fig. 3 is a schematic flow chart of a front-end project construction method according to a third embodiment of the present invention, where the embodiment of the present invention optimizes the construction process of the target project based on the above embodiment.
Illustratively, the determining the current target page in the target item to be constructed includes: and determining a current target page according to a construction target configuration file corresponding to a target item to be constructed, wherein the construction target configuration file contains attribute information of all target modules in the target item and attribute information of all target pages in each target module. Wherein the attribute information may include a name or code, etc. Building a target profile may be understood as a personalized profile of the target item. The method has the advantages that the relation between each target module and each target page can be reasonably managed by setting the construction target file, and meanwhile, the construction sequence of each target module and each target page can be conveniently determined.
Further, before determining the current target page according to the construction target configuration file corresponding to the target item to be constructed, the method further includes: and acquiring a construction target configuration file corresponding to the target item, and storing the construction target configuration file in a file directory corresponding to the target item. The arrangement has the advantages that the organization structure of the target item is convenient to reasonably set, and the organization structure is convenient to read in the construction process.
Further, after performing a corresponding construction operation on the current target page according to the target configuration information, the method further includes: if the fact that the target module to which the current target page belongs has the unstructured target page is judged, determining the next target page as a new current target page, and repeatedly executing related operations of merging sub-configuration information corresponding to the current target page. The advantage of this arrangement is that the target pages in the target modules are constructed in sequence according to a predetermined order, avoiding omission.
Further, after performing a corresponding construction operation on the current target page according to the target configuration information, the method further includes: if all the target pages in the target modules to which the current target page belongs are judged to be completely constructed, judging whether an unstructured target module exists, if so, determining the first target page in the next target module as a new current target page, and repeatedly executing related operations of merging the sub configuration information corresponding to the current target page. The advantage of this arrangement is that the target modules are built in sequence in a predetermined order, avoiding omission.
Optionally, as shown in fig. 3, the method may include:
step 301, obtaining configuration files and construction target configuration files corresponding to all sub configuration information contained in a target item to be constructed, and storing the configuration files and the construction target configuration files in file directories corresponding to the target item.
For example, a target module and a target page may be set in the build target configuration file, indicating the name of the target module and the name of the target page (e.g., a page tag). For example:
{
ModuleA ",// builds all pages of the current module
ModuleB, [ "PageA", "PageB", "PageC" ]// construct the specified page of the current module
}
The system comprises a target module A and a target module B, wherein all pages in the target module A are target pages, and pages A, B and C in the target module B are target pages.
For example, fig. 4 is a schematic diagram of a file directory structure of a target item according to the third embodiment of the present invention, as shown in fig. 4, under a configuration file in which a public build configuration file (i.e., a base build configuration file) is stored in the directory structure, there may be other files for reference of the base build configuration file under the configuration file, and so on. Taking a target module A (moduleA) as an example, a module construction configuration file of the moduleA is stored under a folder of the moduleA, a folder of a target page A (pageA) in the moduleA is a subfolder of the folder of the moduleA, and a page construction configuration file of the pageA is stored under the folder of the pageA. The build target configuration file is stored under the root directory in the directory structure.
And 302, reading the public construction configuration file to obtain public construction configuration information.
And 303, reading the construction target configuration file, and determining a target module and a target page.
Step 304, determining a current target module, and reading a module construction configuration file corresponding to the current target module to obtain module construction configuration information.
Illustratively, when this step is first performed, the current target module is the first target module indicated in the build target profile.
Step 305, sequentially reading page construction configuration information corresponding to each target page in the current target module.
Step 306, combining the public construction configuration information, the module construction configuration information and the page construction configuration information of the current target page aiming at each target page in the current target module to obtain the target configuration information corresponding to the current target page.
Step 307, starting the construction instance of the current target module to complete the construction of all target pages in the current target module.
For example, the target configuration information may be passed into the build program to complete the corresponding build operation. As shown in fig. 4, the building program is stored in the root directory of the file directory and can be shared by the target pages in all the target modules in the target item.
Alternatively, the construction of the target page can be started after each piece of sub-configuration information corresponding to one target page is combined, and the sub-configuration information corresponding to the next target page is combined after the construction is completed.
Step 308, judging whether an unstructured target module exists, if yes, returning to execute step 304; otherwise, the flow is ended.
For example, it may be determined whether all the target modules determined in step 303 are constructed, and if so, there are no unstructured target modules.
According to the front-end project construction method provided by the embodiment of the invention, the target modules and the target pages are determined by reading the construction target configuration files of the target projects, the construction of the target pages in each target module is completed sequentially, when each target page is constructed, corresponding public construction configuration information, module construction configuration information and page construction configuration information are acquired first, after the construction is combined into the target configuration information, the construction is completed through a shared construction program, and the flexibility and construction efficiency of the construction of the whole target project can be effectively improved.
Fig. 5 is a schematic flow chart of a front-end project construction method according to a fourth embodiment of the present invention, where the embodiment of the present invention is further optimized based on the foregoing embodiment, so that development and construction of a project can be considered, and overall efficiency can be improved.
The method provided by the embodiment of the invention can further comprise the following steps: detecting whether the development stage is currently in progress; if yes, determining a change page when the change of the configuration file in the target item or the construction target configuration file is monitored; and determining the changed page as a new current target page, and repeatedly executing related operations of merging the sub-configuration information corresponding to the current target page. The method has the advantages that development and construction can be independently carried out, when the configuration file in the target project or the construction target configuration file changes in the development process, the corresponding target page can be reconstructed in time, and the updating efficiency of the project is ensured.
Further, the detecting whether the development stage is currently performed includes: and detecting whether the development stage is currently performed or not when all the target modules in the target project are determined to be constructed. This has the advantage that the stability of the construction process can be further ensured.
Optionally, as shown in fig. 5, the method may include:
step 501, obtain configuration files and construction target configuration files corresponding to all sub configuration information contained in the target item to be constructed, and store the configuration files and the construction target configuration files in file directories corresponding to the target item.
Step 502, reading the public construction configuration file to obtain public construction configuration information.
And 503, reading the construction target configuration file, and determining a target module and a target page.
Step 504, determining a current target module, and reading a module construction configuration file corresponding to the current target module to obtain module construction configuration information.
Illustratively, when this step is first performed, the current target module is the first target module indicated in the build target profile.
Step 505, sequentially reading page construction configuration information corresponding to each target page in the current target module.
Step 506, combining the public construction configuration information, the module construction configuration information and the page construction configuration information of the current target page aiming at each target page in the current target module to obtain target configuration information corresponding to the current target page.
Step 507, starting the construction example of the current target module to complete the construction of all target pages in the current target module.
Step 508, judging whether an unstructured target module exists, if yes, returning to execute step 304; otherwise, step 509 is performed.
Step 509, detecting whether the development stage is currently in progress, if yes, executing step 510; otherwise, the journey is ended.
Step 510, monitor whether the configuration file in the target item or the build target configuration file changes, if yes, execute step 511; otherwise, the flow is ended.
For example, in the embodiment of the present invention, the project development and the project architecture may be performed in parallel, and in the process of project construction, a developer may change the content of a configuration file, may add or delete pages, etc., so that a construction target configuration file may also change.
Optionally, it may also monitor whether the source code, etc. has changed, if so, step 511 may also be performed.
By way of example, it may be determined whether a change has occurred by again reading the profile and constructing the target profile and comparing it with what was previously read.
Step 511, determining a change page, determining the change page as a new current target page, and executing step 512.
For example, the information obtained by reading the configuration file again and constructing the target configuration file can be compared with the information obtained in the last reading, the place with the difference is screened out, and then the place with the difference is matched with the corresponding target page, so that the change page is determined.
Step 512, merging the public construction configuration information, the module construction configuration information and the page construction configuration information of the current target page to obtain target configuration information corresponding to the current target page, and performing corresponding construction operation on the current target page according to the target configuration information.
For example, if there is more than one change page, the construction of each change page may be completed in turn.
The front-end project construction method provided by the embodiment of the invention has the advantages that development and construction of the project are considered, so that development and construction can be independently carried out, project construction can be timely updated according to development, and all pages do not need to be operated.
Fig. 6 is a block diagram of a front-end project construction apparatus according to a fifth embodiment of the present invention, where the apparatus may be implemented in software and/or hardware, and may be generally integrated in a computer device, and the front-end project may be constructed by executing the front-end project construction method. As shown in fig. 6, the apparatus includes:
the page determining module 601 is configured to determine a current target page in a target item to be constructed, where the target item includes at least two target pages;
a configuration merging module 602, configured to merge sub-configuration information corresponding to the current target page to obtain target configuration information, where the sub-configuration information includes public construction configuration information and private construction configuration information, the public construction configuration information includes construction configuration information shared by all target pages in the target item, and the private construction configuration information includes construction configuration information specific to the current target page compared with other target pages in the target item;
And the construction module 603 is configured to perform corresponding construction operation on the current target page according to the target configuration information.
In the front-end project construction device provided by the embodiment of the invention, in the construction process of a multi-page application project, a current target page in a target project to be constructed is determined, sub-configuration information corresponding to the current target page is combined to obtain target configuration information, wherein the sub-configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target project, the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target project, and corresponding construction operation is carried out on the current target page according to the target configuration information. By adopting the technical scheme, the target pages in the target project do not need to be completely and commonly configured, personalized configuration of the target pages is realized through private construction configuration information, and the flexibility of the construction process of the multi-page application program project is improved.
Optionally, the target item includes at least two target modules, each target module includes at least two target pages, the private construction configuration information includes module construction configuration information and page construction configuration information, the module construction configuration information includes construction configuration information specific to a current target module compared with other target modules in the target item and common to all target pages in the current target module, and the page construction configuration information includes construction configuration information specific to the current target page compared with other target pages in the target module.
Optionally, the apparatus further comprises:
the configuration file acquisition module is used for acquiring configuration files corresponding to all sub configuration information contained in the target item before the current target page in the target item to be constructed is determined, and storing the configuration files in a file directory corresponding to the target item.
Optionally, the apparatus further comprises:
and the configuration file reading module is used for reading the configuration file corresponding to the current target page before merging the sub-configuration information corresponding to the current target page so as to acquire the sub-configuration information corresponding to the current target page.
Optionally, the determining the current target page in the target item to be constructed includes:
and determining a current target page according to a construction target configuration file corresponding to a target item to be constructed, wherein the construction target configuration file contains attribute information of all target modules in the target item and attribute information of all target pages in each target module.
Optionally, the apparatus further comprises:
the construction target configuration file acquisition module is used for acquiring the construction target configuration file corresponding to the target item before the current target page is determined according to the construction target configuration file corresponding to the target item to be constructed, and storing the construction target configuration file in the file catalogue corresponding to the target item.
Optionally, the apparatus further comprises:
the first judging module is used for judging that an unstructured target page exists in the target module to which the current target page belongs after corresponding construction operation is carried out on the current target page according to the target configuration information;
and the first target page updating module is used for determining the next target page as a new current target page when the first judging module judges that the target module to which the current target page belongs has an unstructured target page, and controlling the configuration merging module and the related module to repeatedly execute related operations of merging the sub-configuration information corresponding to the current target page.
Optionally, the apparatus further comprises:
and the second judging module is used for judging that all target pages in the target module to which the current target page belongs are constructed after corresponding construction operation is carried out on the current target page according to the target configuration information.
And the second target page updating module is used for judging whether an unstructured target module exists or not when the second judging module judges that all target pages in the target modules to which the current target page belongs are completely built, determining the first target page in the next target module as a new current target page if the unstructured target module exists, and controlling the configuration merging module and the related module to repeatedly execute related operations of merging the sub-configuration information corresponding to the current target page.
Optionally, the performing a corresponding construction operation on the current target page according to the target configuration information includes:
and transmitting the target configuration information into a preset construction function to realize construction of the current target page.
Optionally, the preset construction function is stored in a root directory of a file directory corresponding to the target item, so as to be shared by all target pages in the target item.
Optionally, the apparatus further comprises:
the detection module is used for detecting whether the development stage is currently in;
the monitoring module is used for determining a change page when the detection module detects whether the current development stage is in progress or not and monitors that the configuration file in the target project or the construction target configuration file is changed;
and the second target page updating module is used for determining the changed page as a new current target page, and controlling the configuration merging module and the related module to repeatedly execute related operations of merging the sub-configuration information corresponding to the current target page.
Optionally, the detecting whether the development stage is currently performed includes:
and detecting whether the development stage is currently performed or not when all the target modules in the target project are determined to be constructed.
Example six
The embodiment of the present invention also provides a storage medium containing computer executable instructions, which when executed by a computer processor, are used to perform the front-end project construction method provided by the embodiment of the present invention, the method comprising:
determining a current target page in a target item to be constructed, wherein the target item comprises at least two target pages;
merging sub configuration information corresponding to the current target page to obtain target configuration information, wherein the sub configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target item, and the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target item;
and carrying out corresponding construction operation on the current target page according to the target configuration information.
Storage media-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk or tape devices; computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, rambus (Rambus) RAM, etc.; nonvolatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a second, different computer system connected to the first computer system through a network such as the internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (e.g., in different computer systems connected by a network). The storage medium may store program instructions (e.g., embodied as a computer program) executable by one or more processors.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the front-end project building operation described above, and may also perform the related operations in the front-end project building method provided in any of the corresponding embodiments of the present invention.
Example seven
The embodiment of the invention provides a computer device which integrates the front-end project construction device provided by the embodiment of the invention. Fig. 7 is a block diagram of a computer device according to a seventh embodiment of the present invention. The computer device 700 comprises a memory 701, a processor 702 and a computer program stored on the memory 701 and executable on the processor 702, which processor 702 implements the geographical position determining method provided by the embodiments of the invention when executing the computer program. The method comprises the following steps:
determining a current target page in a target item to be constructed, wherein the target item comprises at least two target pages;
merging sub configuration information corresponding to the current target page to obtain target configuration information, wherein the sub configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target item, and the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target item;
And carrying out corresponding construction operation on the current target page according to the target configuration information.
According to the computer equipment provided by the embodiment of the invention, the target pages in the target project do not need to be completely and commonly configured, the personalized configuration of the target pages is realized through private construction configuration information, and the flexibility of the construction process of the multi-page application program project is improved.
The front-end project construction device, the storage medium and the computer equipment provided in the above embodiments can execute the front-end project construction method provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in the above embodiments may be referred to the front-end project construction method provided in any embodiment of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.
Claims (13)
1. The front-end project construction method is characterized by comprising the following steps:
determining a current target page in a target item to be constructed, wherein the target item is a multi-page Web application program which is currently required to be constructed, and the target item comprises at least two target pages;
merging sub configuration information corresponding to the current target page to obtain target configuration information, wherein the sub configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target item, and the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target item;
performing corresponding construction operation on the current target page according to the target configuration information;
the private construction configuration information comprises module construction configuration information and page construction configuration information, the module construction configuration information comprises construction configuration information which is specific to a current target module compared with other target modules in the target project and is shared by all target pages in the current target module, the page construction configuration information comprises construction configuration information which is specific to the current target page compared with other target pages in the target module, and the modules comprise page sets belonging to the same category;
The determining the current target page in the target item to be constructed comprises the following steps:
and determining a current target page according to a construction target configuration file corresponding to a target item to be constructed, wherein the construction target configuration file contains attribute information of all target modules in the target item and attribute information of all target pages in each target module.
2. The method of claim 1, further comprising, prior to said determining a current target page in a target item to be built:
and acquiring configuration files corresponding to all the sub configuration information contained in the target item, and storing the configuration files in a file directory corresponding to the target item.
3. The method of claim 2, further comprising, prior to said merging the sub-configuration information corresponding to the current target page:
and reading the configuration file corresponding to the current target page to acquire the sub-configuration information corresponding to the current target page.
4. The method according to claim 1, further comprising, before determining the current target page according to the build target profile corresponding to the target item to be built:
And acquiring a construction target configuration file corresponding to the target item, and storing the construction target configuration file in a file directory corresponding to the target item.
5. The method of claim 1, further comprising, after performing a corresponding building operation for the current target page according to the target configuration information:
if the fact that the target module to which the current target page belongs has the unstructured target page is judged, determining the next target page as a new current target page, and repeatedly executing related operations of merging sub-configuration information corresponding to the current target page.
6. The method of claim 5, further comprising, after performing a corresponding building operation for the current target page according to the target configuration information:
if all the target pages in the target modules to which the current target page belongs are judged to be completely constructed, judging whether an unstructured target module exists, if so, determining the first target page in the next target module as a new current target page, and repeatedly executing related operations of merging the sub configuration information corresponding to the current target page.
7. The method according to any one of claims 1-6, wherein the performing a corresponding building operation for the current target page according to the target configuration information includes:
and transmitting the target configuration information into a preset construction function to realize construction of the current target page.
8. The method of claim 7, wherein the preset build function is stored in a root directory of a file directory corresponding to the target item for sharing by all target pages in the target item.
9. The method as recited in claim 2, further comprising:
if the current development stage is in, determining a change page when the change of the configuration file in the target project or the construction target configuration file is monitored;
and determining the changed page as a new current target page, and repeatedly executing related operations of merging the sub-configuration information corresponding to the current target page.
10. The method as recited in claim 9, further comprising:
and detecting whether the development stage is currently performed or not when all the target modules in the target project are determined to be constructed.
11. A front-end project building apparatus, comprising:
The page determining module is used for determining a current target page in a target project to be constructed, wherein the target project is a multi-page Web application program which is required to be constructed currently, and the target project comprises at least two target pages;
the configuration merging module is used for merging the sub-configuration information corresponding to the current target page to obtain target configuration information, wherein the sub-configuration information comprises public construction configuration information and private construction configuration information, the public construction configuration information comprises construction configuration information shared by all target pages in the target item, and the private construction configuration information comprises construction configuration information specific to the current target page compared with other target pages in the target item;
the construction module is used for carrying out corresponding construction operation on the current target page according to the target configuration information;
the private construction configuration information comprises module construction configuration information and page construction configuration information, the module construction configuration information comprises construction configuration information which is specific to a current target module compared with other target modules in the target project and is shared by all target pages in the current target module, the page construction configuration information comprises construction configuration information which is specific to the current target page compared with other target pages in the target module, and the modules comprise page sets belonging to the same category;
The determining the current target page in the target item to be constructed comprises the following steps:
and determining a current target page according to a construction target configuration file corresponding to a target item to be constructed, wherein the construction target configuration file contains attribute information of all target modules in the target item and attribute information of all target pages in each target module.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-10.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-10 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910697468.3A CN110413272B (en) | 2019-07-30 | 2019-07-30 | Front-end project construction method, device, storage medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910697468.3A CN110413272B (en) | 2019-07-30 | 2019-07-30 | Front-end project construction method, device, storage medium and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110413272A CN110413272A (en) | 2019-11-05 |
CN110413272B true CN110413272B (en) | 2023-10-13 |
Family
ID=68364324
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910697468.3A Active CN110413272B (en) | 2019-07-30 | 2019-07-30 | Front-end project construction method, device, storage medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110413272B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111079062A (en) * | 2019-12-27 | 2020-04-28 | 北京达佳互联信息技术有限公司 | Page creating method and device, electronic equipment and storage medium |
CN111158680A (en) * | 2019-12-27 | 2020-05-15 | 北京同邦卓益科技有限公司 | Page construction method, device, equipment and storage medium |
WO2022121971A1 (en) * | 2020-12-10 | 2022-06-16 | 百果园技术(新加坡)有限公司 | Front-end project processing method and apparatus, device, management system, and storage medium |
CN113467823B (en) * | 2021-06-21 | 2024-03-01 | 北京达佳互联信息技术有限公司 | Configuration information acquisition method, device, system and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107704243A (en) * | 2017-10-19 | 2018-02-16 | 用友网络科技股份有限公司 | Construction method and device, the computer equipment and storage medium of front-end interface |
CN109388399A (en) * | 2018-10-25 | 2019-02-26 | 北京字节跳动网络技术有限公司 | The page and Universal page configuration file generation method, device, equipment and medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040199786A1 (en) * | 2002-12-02 | 2004-10-07 | Walmsley Simon Robert | Randomisation of the location of secret information on each of a series of integrated circuits |
CN109683892B (en) * | 2018-12-11 | 2022-05-31 | 北京城市网邻信息技术有限公司 | Page display method and device, computer equipment and storage medium |
-
2019
- 2019-07-30 CN CN201910697468.3A patent/CN110413272B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107704243A (en) * | 2017-10-19 | 2018-02-16 | 用友网络科技股份有限公司 | Construction method and device, the computer equipment and storage medium of front-end interface |
CN109388399A (en) * | 2018-10-25 | 2019-02-26 | 北京字节跳动网络技术有限公司 | The page and Universal page configuration file generation method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN110413272A (en) | 2019-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110413272B (en) | Front-end project construction method, device, storage medium and equipment | |
US8789014B2 (en) | Managing a working set in an integrated development environment | |
EP2597579B1 (en) | Database backing-up and recovering method and device | |
US9646030B2 (en) | Computer-readable medium storing program and version control method | |
US7194475B2 (en) | Method, system, and program for performing an impact analysis of program statements in at least one source code file | |
US20040230964A1 (en) | System and method for managing source code and acquiring metrics in software development | |
RU2012110068A (en) | AUTOMATIC SEARCH FOR CONTEXT-RELATED PROBLEMS OF THE PROBLEM | |
JP2012146301A (en) | Method and system for executing increment sql server database backup | |
CN110580189A (en) | method and device for generating front-end page, computer equipment and storage medium | |
US20130246365A1 (en) | Methods and systems for searching a backup volume | |
CN113204571B (en) | SQL execution method and device related to write-in operation and storage medium | |
US8266189B2 (en) | Adapting between coupled and decoupled provider interfaces | |
CN112463450A (en) | Incremental backup management method, system, electronic equipment and storage medium | |
CN108897569A (en) | The method for cleaning and computer readable storage medium of iOS engineering discarded record | |
CN103092955B (en) | Checkpointed method, Apparatus and system | |
CN110399378B (en) | Database system lock operation analysis method and device | |
JP6792592B2 (en) | Screen discrimination device, screen discrimination method and program | |
CN116521796A (en) | Distributed database system and data reading method and device | |
CN106648550B (en) | Method and device for concurrently executing tasks | |
US8117408B2 (en) | Buffer for object information | |
CN113468316A (en) | Method and system for quickly retrieving SVN document library | |
JP2018085042A (en) | Database management device, information processing system, database management method and database management program | |
CN109019217B (en) | Elevator control software field debugging system | |
US8296336B2 (en) | Techniques for efficient dataloads into partitioned tables using swap tables | |
CN117687681B (en) | Version management method and system for low-code application |
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 |