CN111724133A - Method and device for creating project - Google Patents

Method and device for creating project Download PDF

Info

Publication number
CN111724133A
CN111724133A CN202010567020.2A CN202010567020A CN111724133A CN 111724133 A CN111724133 A CN 111724133A CN 202010567020 A CN202010567020 A CN 202010567020A CN 111724133 A CN111724133 A CN 111724133A
Authority
CN
China
Prior art keywords
project
file
projects
static resource
configuration information
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.)
Pending
Application number
CN202010567020.2A
Other languages
Chinese (zh)
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010567020.2A priority Critical patent/CN111724133A/en
Publication of CN111724133A publication Critical patent/CN111724133A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Operations Research (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides a method and a device for creating a project, relates to the technical field of networks, and can reduce the time consumption for creating the project. The specific scheme comprises the following steps: acquiring configuration information of one or more projects to be created in a project; the configuration information includes an identification of one or more items; receiving an input folder path through a packaging entry of a project; the folder path is a path of folders used for saving all projects in the project; and acquiring the static resource files of one or more projects according to the folder path and the configuration information, and packaging the static resource files of one or more projects to obtain a packaged file.

Description

Method and device for creating project
Technical Field
The present application relates to the field of network technologies, and in particular, to a method and an apparatus for creating a project.
Background
With the widespread use of the internet, front-end development has become increasingly important and complex. Each project (e.g., an application or website) may be composed of a plurality of projects (e.g., pages presented by the application or website to the user) whose page contents and page interaction requirements differ from each other. Wherein creating an item with a certain display requirement may be seen as an operational activity. Since each project included in a project often does not need long-term iteration, and the projects are not related to each other, there are few cases of code or picture reuse, and therefore, many projects are accumulated in the long-term development process of a project. When a new project needs to be added, a developer can write the source code of the new project; the source code may then be released for on-line use through a development phase and a testing phase.
In the development phase and the test phase of the source code of the new project, a front-end development tool needs to be used for traversing the source codes of all projects under the project engineering. The source code for all items includes not only the source code for the new item, but also the source code for previously created items. Specifically, the front-end development tool can compile and package source codes of all items; and operating the packaged file through a browser to check the display effect of the new item, and performing operations such as code modification and the like based on the display effect of the new item.
It can be seen that, in a project, each time a new project is created, in the development phase and the test phase of the new project, the source codes of all projects of the project need to be compiled and packaged, which reduces the development efficiency and the test efficiency and increases the time consumption for creating the new project.
Disclosure of Invention
The embodiment of the application provides a method and a device for creating a project, which can reduce the time consumption for creating the project.
In order to achieve the technical purpose, the embodiment of the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for creating a project, where the method includes: acquiring configuration information of one or more projects to be created in a project; the configuration information includes an identification of one or more items; receiving an input folder path through a packaging entry of a project; the folder path is a path of folders used for saving all projects in the project; and acquiring the static resource files of one or more projects according to the folder path and the configuration information, and packaging the static resource files of one or more projects to obtain a packaged file.
In one possible embodiment, the configuration information includes first configuration information; the first configuration information includes an identification of one or more projects of the development phase. Acquiring configuration information of one or more projects to be created in a project, comprising: in a development stage, acquiring first configuration information from a development project array; the first configuration information is added by the developer in the development project array.
In another possible implementation, obtaining the static resource files of the one or more items according to the folder path and the configuration information, and packaging the static resource files of the one or more items to obtain a packaged file includes: in the development stage, a cache file is newly built; and acquiring static resource files of one or more projects in the development stage according to the folder path and the identification of the one or more projects in the development stage, and packaging the static resource files of the one or more projects in the development stage to a cache file to obtain a packaged file.
In another possible implementation, the one or more items include: one or more front-end items to be created. After obtaining the static resource files of the one or more projects in the development phase according to the folder path and the identifiers of the one or more projects in the development phase, and packaging the static resource files of the one or more projects in the development phase into a cache file to obtain a packaged file, the method further comprises: and loading the packed file through a browser, and displaying the page display effect of one or more front-end projects in the development stage.
In another possible embodiment, after loading the package file through the browser and displaying the page display effect of one or more items in the development phase, the method further includes: and when the static resource files of the one or more front-end projects in the development stage are modified, updating the packed files, loading the updated packed files, and displaying the modified page display effect of the one or more front-end projects in the development stage.
In another possible embodiment, the modified static resource file of the one or more front-end projects of the development phase is used for testing the one or more front-end projects of the development phase in the testing phase.
In another possible embodiment, the configuration information includes second configuration information; the second configuration information includes an identification of one or more items of the testing phase. Acquiring configuration information of one or more projects to be created in a project, comprising: in the testing stage, second configuration information is obtained from the testing item array; the second configuration information is added by the developer in the test item array.
In another possible implementation, obtaining the static resource files of the one or more items according to the folder path and the configuration information, and packaging the static resource files of the one or more items to obtain a packaged file includes: in the testing stage, an entity file is newly built; acquiring static resource files of one or more projects in a testing stage according to the folder path and the identification of the one or more projects in the testing stage; acquiring the file type of each static resource file in the static resource files of one or more projects in the testing stage; marking the corresponding static resource files by adopting the file type of each static resource file, the identification of one or more projects in the testing stage and preset identification information; the preset identification information comprises a path of an entity file; performing classified packing on the marked static resource files of each project to obtain one or more first packed sub-files; and respectively packaging one or more first packaged sub-files of one or more items in the testing stage to obtain one or more second packaged sub-files, and storing the one or more second packaged sub-files to the entity file to obtain a packaged file.
In another possible implementation, the one or more items include: one or more front-end items to be created. After the one or more first packing sub-files of the one or more items in the testing stage are respectively packed to obtain one or more second packing sub-files, the one or more second packing sub-files are saved to the entity file, and the packed file is obtained, the method further includes: when a browsing instruction of a target front-end item in the one or more front-end items in the testing stage is received, responding to the browsing instruction, and determining a second packaging sub-file corresponding to the target front-end item from the packaging files; and sequentially loading one or more first packaging sub-files in the second packaging sub-file of the target front-end project through the browser, and displaying the page display effect of the target front-end project.
In another possible implementation, the preset identification information further includes a reference relationship between the static resource files. The method for marking the corresponding static resource files by adopting the file types of each static resource file, the identification of one or more items in the testing stage and preset identification information comprises the following steps: obtaining a reference path of one or more static resource files according to the reference relationship among the static resource files; the reference path represents a storage path of the static resource file referenced by the static resource file; obtaining entity file storage paths of the static resource files of one or more projects in the testing stage according to the file type of each static resource file, the identification of one or more projects and the paths of the entity files; and marking the corresponding static resource files by utilizing the reference paths of the one or more static resource files and the entity file storage paths of the static resource files of the one or more projects in the testing stage.
In another possible implementation, the second configuration information further includes page path suffixes of respective one or more front-end items of the testing phase; the page path suffix is combined with the access path of the project to characterize the page link of the front end project to which the suffix belongs.
In a second aspect, an embodiment of the present application provides an apparatus for creating a project, where the apparatus includes: the device comprises a configuration information acquisition module and a packaging module. The system comprises a configuration information acquisition module, a configuration information acquisition module and a configuration information acquisition module, wherein the configuration information acquisition module is used for acquiring configuration information of one or more projects to be created in a project; the configuration information includes an identification of one or more items. The packaging module is used for receiving an input folder path through a packaging inlet of the project; the folder path is a path of folders used for saving all projects in the project; and acquiring the static resource files of one or more projects according to the folder path and the configuration information, and packaging the static resource files of one or more projects to obtain a packaged file.
In one possible embodiment, the configuration information includes first configuration information; the first configuration information includes an identification of one or more projects of the development phase. The configuration information acquisition module is used for acquiring configuration information of one or more projects to be created in project engineering, and comprises the following steps: the configuration information acquisition module is specifically used for acquiring first configuration information from a development project array in a development stage; the first configuration information is added by the developer in the development project array.
In another possible embodiment, the packing module includes: and developing a packaging module. The packaging module is used for acquiring the static resource files of one or more projects according to the folder path and the configuration information, packaging the static resource files of one or more projects to obtain a packaged file, and comprises: the development packaging module is used for creating a new cache file in a development stage; and acquiring static resource files of one or more projects in the development stage according to the folder path and the identification of the one or more projects in the development stage, and packaging the static resource files of the one or more projects in the development stage to a cache file to obtain a packaged file.
In another possible implementation, the one or more items include: one or more front-end items to be created. The device still includes: and the browsing module is used for acquiring the static resource files of the one or more projects in the development stage according to the folder path and the identification of the one or more projects in the development stage, packaging the static resource files of the one or more projects in the development stage into a cache file, loading the packaged files through a browser after obtaining the packaged files, and displaying the page display effect of the one or more front-end projects in the development stage.
In another possible implementation manner, the packaging module is further configured to update the packaging file after the packaging file is loaded through the browser and the page display effect of the one or more projects in the development phase is displayed and the static resource file of the one or more front-end projects in the development phase is modified. And the browsing module is also used for loading the updated packaging file and displaying the modified page display effect of one or more front-end projects in the development stage.
In another possible embodiment, the modified static resource file of the one or more front-end projects of the development phase is used for testing the one or more front-end projects of the development phase in the testing phase.
In another possible embodiment, the configuration information includes second configuration information; the second configuration information includes an identification of one or more items of the testing phase. The configuration information acquisition module is used for acquiring configuration information of one or more projects to be created in project engineering, and comprises the following steps: the configuration information acquisition module is specifically used for acquiring second configuration information from the test item array in the test stage; the second configuration information is added by the developer in the test item array.
In another possible embodiment, the packing module includes: and (5) testing the packaging module. The packaging module is used for acquiring the static resource files of one or more projects according to the folder path and the configuration information, packaging the static resource files of one or more projects to obtain a packaged file, and comprises:
a test packing module to: in the testing stage, an entity file is newly built; acquiring static resource files of one or more projects in a testing stage according to the folder path and the identification of the one or more projects in the testing stage; acquiring the file type of each static resource file in the static resource files of one or more projects in the testing stage; marking the corresponding static resource files by adopting the file type of each static resource file, the identification of one or more projects in the testing stage and preset identification information; the preset identification information comprises a path of an entity file; performing classified packing on the marked static resource files of each project to obtain one or more first packed sub-files; and respectively packaging one or more first packaged sub-files of one or more items in the testing stage to obtain one or more second packaged sub-files, and storing the one or more second packaged sub-files to the entity file to obtain a packaged file.
In another possible implementation, the one or more items include: one or more front-end items to be created. The device still includes: and a browsing module. The browsing module is used for: after one or more first packing sub-files of one or more items in the testing stage are respectively packed to obtain one or more second packing sub-files, the one or more second packing sub-files are saved to an entity file, and after the packing files are obtained, when a browsing instruction of a target front-end item in one or more front-end items in the testing stage is received, the second packing sub-file of the target front-end item is determined from the packing files in response to the browsing instruction; and sequentially loading one or more first packing sub-files in the second packing sub-file of the target front-end project, and displaying the page display effect of the target front-end project.
In another possible implementation, the preset identification information further includes a reference relationship between the static resource files. The test packaging module is used for marking the corresponding static resource files by adopting the file types of each static resource file, the identification of one or more items in the test stage and preset identification information, and comprises the following steps:
the test packaging module is specifically used for: obtaining a reference path of one or more static resource files according to the reference relationship among the static resource files; the reference path represents a storage path of the static resource file referenced by the static resource file; obtaining entity file storage paths of the static resource files of one or more projects in the testing stage according to the file type of each static resource file, the identification of one or more projects and the paths of the entity files; and marking the corresponding static resource files by utilizing the reference paths of the one or more static resource files and the entity file storage paths of the static resource files of the one or more projects in the testing stage.
In another possible implementation, the second configuration information further includes page path suffixes of respective one or more front-end items of the testing phase; the page path suffix is combined with the access path of the project to characterize the page link of the front end project to which the suffix belongs.
In a third aspect, an embodiment of the present application further provides a server, where the server includes: a processor and a memory for storing processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of creating a project as the first aspect and any of its possible embodiments.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which computer instructions are stored, where the computer instructions, when executed on an electronic device, implement a method for creating a project according to the first aspect and any one of the possible implementations thereof.
In a fifth aspect, the present application further provides a computer program product including one or more instructions that can be executed on a computer to cause the computer to perform the method for creating a project according to the first aspect and any possible implementation manner thereof.
It can be understood that, with the method provided in the embodiment of the present application, configuration information of one or more projects to be created in a project is obtained, where the configuration information includes an identifier of the one or more projects to be created; receiving an input folder path through a packaging entry of the project; the folder path is a path of folders for saving all items in the project, that is, folders for saving all items in the project can be located through the folder path; then, by using the identifiers of the one or more items to be created in the configuration information, the one or more items to be created can be located in the folder for storing all the items in the project; therefore, according to the folder path and the configuration information, the static resource files of the one or more projects to be created can be obtained and packaged to obtain a packaged file; because only the static resource files of the one or more projects to be created are packed, but not the static resource files of all the projects in the project, other projects in the project which are irrelevant to the one or more projects to be created are prevented from being mixed into the packing flow, and the packing workload is reduced; the time consumption for creating the one or more projects can be reduced because the packaging workload in the process of creating the one or more projects is reduced.
Drawings
FIG. 1 is a schematic diagram of an implementation environment related to a method for creating a project according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for creating a project according to an embodiment of the present application;
FIG. 3 is a packaging diagram of a project provided by an embodiment of the present application;
FIG. 4 is a schematic structural diagram of an apparatus for creating a project according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present embodiment, "a plurality" means two or more unless otherwise specified.
Embodiments of the present application provide a method for creating a project, and embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Please refer to fig. 1, which illustrates an implementation environment diagram of a method for creating a project according to an embodiment of the present application. As shown in FIG. 1, the implementation environment may include a plurality of servers 101 and terminal devices 102, and the plurality of servers 101 may include a server 101-1, a server 101-2, and so on.
Typically, a project is created on multiple servers 101 by multiple front-end personnel, and the created project is released online. The user can run and use the project through the terminal device 102. The project may be a front-end project, and the project or the front-end project may include applications and Web sites. For an application, the terminal device 102 may download and install the application, and then may run the application in response to a start operation of the user to provide a corresponding service for the user. For a Web site, the terminal device 102 may load an access link corresponding to the Web site in a browser to display a Web page of the Web site, so as to provide a corresponding service for a user.
In particular, each project may include a plurality of projects. The project may be a front end project included in a front end project. For example, one application may include a plurality of application pages. As another example, a Web site may include multiple Web pages. The front-end personnel may create each project in the project on the plurality of servers 101, respectively, until all projects in the project are created, the project creation is completed. The front-end personnel may then release the project onto-line for use by the terminal device 102. After the project is released on line, the front-end personnel can also add a new project in the project according to the requirements of users.
Wherein, for each project, the process of creating the project by the front-end personnel may comprise: a development phase, a testing phase, and a release phase. Accordingly, the aforementioned front-end personnel may be referred to as a developer, a tester, and a manager, respectively, corresponding to the three stages. In the development phase, the source code file for the project is written and modified by a developer in the development environment. The development environment may include a server installed with a Windows system or a Mac system among the plurality of servers 101, a client, a configuration management tool, and the like. In the testing phase, the effect of the use of the item is tested by a tester in a testing environment. The test environment is simulated by a tester by using a plurality of tools and data, and the test environment is close to the real use environment of a user. Therefore, the using effect of the item obtained by testing can be more real. The test environment may include a server installed with a Linux system among the plurality of servers 101, a client, a configuration management tool, and the like. In the release stage, the source code files of the items passing the test are packaged by the management personnel and then released to the online environment for the terminal equipment to use. The online environment is the real use environment in which the user runs the project on the terminal device 102.
For example, the terminal device in the embodiment of the present application may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), an augmented reality device, a virtual reality device, and the like, and the embodiment of the present application does not particularly limit the specific form of the terminal device.
It should be noted that the method for creating a project provided by the embodiment of the present application may be applied to a plurality of servers 101. The execution subject of the method for creating a project provided by the embodiment of the present application may also be a device for creating a project, and the device for creating a project may be the plurality of servers 101. The device for creating the project can also be an application program (APP) installed with a function for providing the project creation; alternatively, the device for creating the project may be a Central Processing Unit (CPU) in the plurality of servers 101; or a control module for executing a method of creating a project in the plurality of servers 101 described above.
It should be noted that the number of terminal devices and servers in fig. 1 is merely illustrative. There may be any number of terminal devices and servers, depending on the actual needs.
Currently, a project may accumulate many projects during long-term development, including some older projects that are currently used less frequently, in addition to some projects that are currently used more frequently. For example, a promotional activity page that is timed prior to the current time is used. Therefore, there is a need to manage projects during the development of project projects, for example, to flexibly drop some old projects to avoid being affected by old projects when creating new projects. The project can be a front-end project, and the project can be a front-end project.
In the conventional technology, in a process of creating a new project (including a development phase, a test phase and an online phase), source code files of all projects of the project need to be packaged to obtain a packaged file. The source code file of the project includes not only the source code file of the new project, but also the source code files of many other projects that are not related to the new project. Therefore, in the packaging process, many redundant files unrelated to the project are packaged, the packaging workload is increased, and the time consumption for creating the new project is increased.
Secondly, because the packed file includes the source code file of the new project and the source code files of the other projects, the packed file is large, and the time for directly loading the packed file in the development phase is long, that is, the hot load time in the development phase is long. In addition, all source code files for all projects are packaged into one packaged file, so that the source code file of a certain project cannot be quickly determined and maintained (for example, modified or deleted) in subsequent code maintenance.
In contrast, the embodiment of the present application provides a method for creating a project, which can solve the above problems in the related art, reduce the packaging workload, and further reduce the time consumption for creating the new project; and the hot reloading time in the development stage is also reduced, and the source code of a certain project can be quickly determined and maintained during subsequent code maintenance.
Please refer to fig. 2, which is a flowchart illustrating a method for creating a project according to an embodiment of the present application. As shown in fig. 2, the method may include steps 201-203.
Step 201, obtaining configuration information of one or more projects to be created in a project; the configuration information includes an identification of one or more items.
One or more items to be created are determined based on the user's usage needs. Creating one or more project folders in the folders of the project by front-end personnel, and creating a source code file (for example, a static resource file) required by a project corresponding to the project folder in one or more projects to be created in each project folder; the one or more item folders and the one or more items to be created are in a one-to-one correspondence. Then, the developer can also add the configuration information of the one or more projects to be created in a preset project configuration file. Further, when starting to create the one or more items to be created, the apparatus for creating items may obtain configuration information of the one or more items from a preset item configuration file.
Wherein the folder of the project may include a root directory folder of the project. For example, the src folder. The root directory folder is used for storing all projects of the project. The configuration information includes respective identifications of the one or more items. For example, the name of a project folder for storing a source code file required to create a project.
The project can be a front-end project, and the project can be a front-end project. The front end project folder may include a root directory folder, e.g., an src folder, of the front end project.
Illustratively, a front-end project to be created may be a Web page, and a project folder (e.g., test) is newly created in an src folder of a front-end project, and is used for storing static resource files required by the Web page; the static resource file of the Web page may include files such as index.
In some embodiments, the predetermined project profile may be a file stored hierarchically with respect to a root directory folder of the project. Js, for example, stored hierarchically with the src folder of the front end project.
Further, the preset project profile may include: development item arrays (e.g., level arrays) and test item arrays (e.g., online arrays). When a development process needs to be performed on one or more projects, which are the one or more projects in the development phase, a developer can add first configuration information of the one or more projects in the development stage in the development project array. When a test procedure needs to be performed on one or more items, which are the one or more items of the test phase, second configuration information of the one or more items of the test phase may be added to the array of test items. When the release process needs to be performed on one or more items, the one or more items are the one or more items in the release stage, and the second configuration information of the one or more items in the release stage may also be added to the test item array.
Wherein, the one or more projects in the development phase, the one or more projects in the testing phase and the one or more projects in the release phase all belong to one or more projects to be created; also, one or more items in the development phase, one or more items in the testing phase, and one or more items in the release phase may all be the same, may all be different, or may not be completely the same. The first configuration information and the second configuration information of the same item may be the same or different.
In some embodiments, the configuration information comprises first configuration information; the first configuration information includes an identification of one or more projects of the development phase. The device for creating projects can acquire first configuration information from the development project array in the development stage, wherein the first configuration information is added in the development project array by developers.
The project can be a front-end project, and the project can be a front-end project. The first configuration information includes an identification of one or more front-end projects of the development phase.
In some embodiments, the configuration information comprises second configuration information; the second configuration information includes an identification of one or more items of the testing phase. The device for creating the project can acquire second configuration information from the test project array in the test stage, wherein the second configuration information is added in the test project array by the tester.
The project can be a front-end project, and the project can be a front-end project. The second configuration information includes an identification of one or more front-end items of the testing phase.
In some embodiments, the second configuration information further includes an identification of one or more items of the publication phase. The device for creating the project can acquire second configuration information from the test project array in the release stage, wherein the second configuration information is added in the test project array by the administrator.
The identifier of a project in the development stage, the test stage or the release stage may include a name of a project folder of the project; the project folder is a folder that stores source code files (e.g., static resource files) required for the project.
The project can be a front-end project, and the project can be a front-end project. The second configuration information also includes an identification of one or more front-end items of the publishing phase.
In some embodiments, the second configuration information may further include a page path suffix path of each of the one or more front end items of the test phase. The page path suffix represents a page link of a project after being combined with an access path of the project (for example, a front-end project), and the terminal device can display the front-end project by loading the page link of the project.
Illustratively, the page link of the front-end item may include a Uniform Resource Locator (URL). The page path suffix path may be a specific address of a resource in the URL, and the access path of the front-end project engineering may be a service mode or protocol, a host address, and a port number in the URL.
In some embodiments, the second configuration information may further include a page path suffix path of each of the one or more front-end items of the publication phase.
In some embodiments, the configuration information may also include item detail information for each of one or more items to be created (e.g., one or more front-end items). The item detail information is used for representing attribute information of the item to which the item belongs. Such as project creation time, usage description of the project, and effective usage time of the project. And the developer can modify or delete the static resource file of the belonged project according to the project detail information.
In some embodiments, after an item (e.g., a front-end item) is created, the configuration information for the item may be deleted from the pre-set item configuration file.
For example, after a front-end project is developed, a developer may delete the first configuration information of the front-end project from a development project array in a preset project configuration file. After the test is completed or a front-end project is released, the tester or the manager may delete the second configuration information of the front-end project from the test project array in the preset project configuration file.
It can be understood that the front-end personnel can flexibly set the projects (e.g., front-end projects) in the development stage, the testing stage and the release stage through the preset project configuration file.
Step 202, receiving an input folder path through a packaging entry of a project; the folder path is a path of folders used to save all items in the project.
A developer or tester may enter the folder path of the project at the packaging portal of the device that created the project. The device creating the project may then receive the folder path. Wherein the folder path for the project may include a path for a root directory folder (e.g., src folder). The project can be a front-end project, and the project can be a front-end project.
Illustratively, a developer or tester runs a front-end development tool in the device that creates the project. Such as Webpack. Then, at the packaging entry of the front-end development tool (e.g., enpty of Webpack), the folder path of the front-end project is entered.
Step 203, obtaining the static resource files of one or more projects according to the folder path and the configuration information, and packaging the static resource files of one or more projects to obtain a packaged file.
The apparatus for creating an item may determine a path of an item folder of each of one or more items to be created, based on the folder path and the configuration information, and read a static resource file of the item from the path of the item folder. And then, packing the static resource files of one or more projects to be created according to a preset packing configuration file to obtain a packed file. Wherein the project folder for each project includes source code files (e.g., static resource files) required to create the project. The project may be a front-end project, and the project may be a front-end project.
Illustratively, the path of the item folder of the front-end item may be "src/test" according to the path "src" of the root directory folder and the name "test" of the item folder of the front-end item.
In some embodiments, the front-end personnel may modify the default packaging configuration file of the used front-end development tool to obtain a preset packaging configuration file. Wherein the default packaging configuration file includes default packaging rules. The default packing rule may be to separately pack the static resource files of each file type in the static resource files of all items.
Specifically, the preset packaging configuration file comprises a development packaging configuration file and a test packaging configuration file. The developing and packaging configuration file comprises developing and packaging rules, wherein the developing and packaging rules can comprise packaging the static resource files of one or more projects, or respectively packaging the static resource files of each project in the static resource files of one or more projects; the method can also comprise marking the static resource files of one or more projects by using preset reference relations among the static resource files. The test packing configuration file comprises a test packing rule, and the test packing rule can respectively pack the static resource files of each item and each file type in the static resource files of one or more items; the method can further include marking the static resource files of one or more projects by using preset identification information, where the preset identification information may include a preset path of an entity file, a preset reference relationship between each static resource file, and the like.
It should be noted that, for the development phase, because the factors such as network speed and cache do not need to be considered in the development environment, the static resource files of all projects in the development phase can be packaged together to obtain a packaged file and loaded. Wherein, loading the package file is loading the static resource files of all the items. It can be understood that, because the packed file only includes the static resource files of all the projects in the development phase, and does not include other projects except all the projects in the development phase in the project engineering, the size of the packed file is reduced, and thus the hot reloading time of the packed file in the development phase is reduced.
It should be noted that, for the testing stage and the releasing stage, the testing environment is a real use environment simulating the user, the online environment is a real use environment of the user, and the real use environment of the user is limited by the network speed and the cache, so that the static resource files of each item can be packed for the online environment and the testing environment respectively to obtain a packed file composed of the static resource files of each item. The static resource files of each project and each file type can be packed respectively to obtain a packed file consisting of the static resource files of each project and each file type. At this time, only the static resource file of a certain project or only part of the static resource file of a certain project can be loaded when the packed file is loaded, thereby reducing the requirements of network speed, cache and the like. In addition, the static resource file of any project and any file type can be quickly determined in the packaged file, and then the static resource file of any project can be quickly maintained.
In some embodiments, the device creating the project creates the cached files during the development phase. And then obtaining the static resource files of the one or more projects in the development stage according to the folder path and the identification of the one or more projects in the development stage, and packaging the static resource files of the one or more projects in the development stage to a cache file to obtain a packaged file.
A front-end development tool (e.g., Webpack) in the device that created the project may create the cached files during the development phase. And then acquiring static resource files of one or more projects in the development stage according to the folder path and the identification of one or more projects in the development stage, and packaging all the static resource files of one or more projects in the development stage to a cache file according to the development packaging configuration file. The cache file is a packaged file.
The project can be a front-end project, and the project can be a front-end project. The device for creating the project creates a cache file in a development stage. And then acquiring the static resource files of the one or more front-end projects in the development stage according to the folder path and the identifications of the one or more front-end projects in the development stage, and packaging the static resource files of the one or more front-end projects in the development stage into a cache file to obtain a packaged file.
It should be noted that, since the development phase often needs to make more modifications to the source code of one or more projects (e.g., one or more front-end projects) in the development phase, and the cache file has the advantage of quick modification and update, the cache file is used to store the static resource file of the packaged one or more front-end project projects.
Further, the developing and packaging rules in the developing and packaging configuration file may include packaging the static resource file of each of the static resource files of the one or more projects, and marking the static resource files of the one or more projects by using a preset reference relationship between the static resource files. And the front-end development tool in the project creating device obtains the respective reference paths publishpath of one or more static resource files according to the development packaging rule and the reference relationship among the static resource files, and marks the corresponding static resource file by using the respective reference path publishpath of the one or more static resource files. The reference path publicpath of each static resource file characterizes the path of the referenced static resource file compared with the static resource file. And packaging the marked static resource files of the one or more projects to a cache file to obtain a packaged file.
In a development environment, a reference path publishpath of a static resource file represents a relative path of the referenced static resource file compared with the static resource file, that is, a storage path of the referenced static resource file under the same file to which the static resource file belongs. The reference path publishpath of the front-end development tool in the device for creating the project to each of one or more static resource files is stored in the corresponding static resource file in the form of character strings.
It should be noted that, because there is no problem that the packaging environment and the environment for loading the packaged file are changed in the development stage, a static resource file can use a relative path of the referenced static resource file compared with the static resource file, and there is no problem that the static resource file cannot call the referenced static resource file.
It should be noted that the process of obtaining the packaged file by packaging the marked static resource files of the one or more items into the cache file by the item creating apparatus is the same as the process of obtaining the packaged file by packaging the marked static resource files of the one or more items into the cache file, and details are not repeated here.
In some embodiments, the means for creating the project creates the entity file during the testing phase. Acquiring static resource files of one or more projects in the testing stage according to the folder path and the identification of the one or more projects in the testing stage; and acquiring the file type of each static resource file in the static resource files of one or more projects in the testing stage. And then, marking the corresponding static resource file by adopting the file type of each static resource file, the identification of one or more items in the testing stage and preset identification information. The preset identification information comprises a path of the entity file. Finally, performing classified packing on the marked static resource files of each project to obtain one or more first packed sub-files; and respectively packaging one or more first packaging sub-files of one or more items in the testing stage to obtain one or more second packaging sub-files, and storing the one or more second packaging sub-files to the entity file to obtain a packaged file.
A front-end development tool (e.g., Webpack) in the device that creates the project may create an entity file in a path of the entity file in the preset identification information during the testing phase. And then obtaining the static resource files of one or more projects in the testing stage according to the folder path and the identification of one or more projects in the testing stage, and determining the file types of all the static resource files. Then, according to the test packaging rule in the test packaging configuration file, the file type of each static resource file, the identification of one or more items in the test stage and preset identification information can be adopted to mark the corresponding static resource file; and respectively packaging the static resource files of each item and each file type in all the marked static resource files of one or more items in the testing stage to obtain one or more second packaging subfiles corresponding to one or more items. And the second packing sub-file corresponding to each item comprises one or more first packing sub-files with different file types. The project may be a front-end project, and the project may be a front-end project.
It should be noted that, since the online environment is packaged by using the entity file, in order to simulate the online environment more truly and require more testers to test one or more items in the testing stage, the entity file is also used to store the static resource file of one or more items in the testing stage, and the entity file can be sent to a plurality of testers to test.
In some embodiments, the preset identification information includes a path of the entity file. The device for creating the project obtains the entity file storage path names of the static resource files of the one or more projects in the testing stage by adopting the file type of each static resource file, the identification of the one or more projects in the testing stage and the path of the entity file; and naming the corresponding static resource file by using the entity file storage path name.
The identifier of any item may include a name of an item folder of the item. The device for creating the project connects the path of the entity file, the name of the project folder of the project to which the project belongs, the file type of the static resource file and the file name of the static resource file in sequence for each static resource file through a converter (e.g., webpack loader) in the front-end development tool, and obtains the entity file storage path name of each static resource file. The project may be a front-end project, and the project may be a front-end project.
Illustratively, taking a picture as an example, the entity file storage path of the picture is "src/static/game/img/abc. Wherein, src/static is a path of the entity file, and indicates that the entity file is a file stored in the root directory folder src; the name is the name of the item folder of the front-end item to which the image belongs; img is the file type of the image; png is the filename of the picture.
In some embodiments, the preset identification information further includes reference relationships between the respective static resource files. The method comprises the steps that a device for creating a project obtains a reference path publishpath of one or more static resource files according to the reference relation among the static resource files; the reference path of each static resource file characterizes the storage path of the static resource file referenced by the static resource file. And then, obtaining the entity file storage path name of the static resource file of the one or more projects in the testing stage according to the file type of each static resource file, the identification of the one or more projects and the path of the entity file. And finally, marking the corresponding static resource files by utilizing the reference paths of the one or more static resource files and the entity file storage paths of the static resource files of the one or more projects in the testing stage.
The device for creating the project obtains a reference path publicpath of the static resource file according to the reference relationship between every two static resource files in the reference relationships between the static resource files through a converter (e.g., webpack loader) in the front-end development tool. In the test environment, a reference path publishpath of a static resource file represents an absolute path of the referenced static resource file compared with the static resource file, that is, a complete file storage path of the referenced static resource file. In an online environment, the reference path publishpath represents an entity storage path of the static resource file referenced by the static resource file. Then, storing the reference paths of one or more static resource files in the corresponding static resource files in a character string mode; and naming the static resource file by using the entity file storage path of each static resource file.
It should be noted that, after naming the entity file storage path of each static resource file, the name of the static resource file may be referred to when packing the static resource files of each item and each file type respectively for all marked static resource files of one or more items in the test phase.
In some embodiments, the static resource files include static resource files of multiple file types, such as picture files, audio files, js files, css files, and the like. The device for creating the project can respectively obtain the reference path publicpath of the static resource file of each file type according to the reference relationship among the static resource files for each file type. And then obtaining the entity file storage path name of the static resource file of each file type according to the file type of each static resource file, the respective identification of one or more items in the testing stage and the path of the entity file. And finally, marking the corresponding static resource file by using the reference path publishpath of the static resource file of each file type and the entity file storage path of the static resource file of each file type. The project can be a front-end project, and the project can be a front-end project.
Illustratively, the converter Webpack loader in the front-end development tool Webpack includes url-loader, js-loader, and css-loader, among others. Specifically, the process of marking the corresponding static resource file can be executed for the picture file or audio file of one or more front-end projects in the test phase through url-loader; executing a process of marking corresponding static resource files aiming at js files of one or more front-end projects in the testing stage through the js-loader; executing a process of marking corresponding static resource files aiming at the css files of one or more front-end projects in the testing stage through the css-loader;
in some embodiments, the device for creating the project performs the process of step 203 in the release phase, and the same process as the process of step 203 in the test phase is not described here again.
The project can be a front-end project, and the project can be a front-end project. In the release stage, the project creating device packages the marked static resource files of each front-end project in a classified mode to obtain one or more first package sub-files; and respectively packaging one or more first packaging sub-files of one or more front-end items in the publishing phase to obtain one or more second packaging sub-files, storing the one or more second packaging sub-files to the entity file, and after the packaging files are obtained, mapping a Hyper Text Markup Language (Html) file in the second packaging sub-file of each front-end item in the one or more front-end items in the publishing phase and a page path suffix (pl) path of a corresponding front-end item in the second configuration information. Then, other first package sub-files (for example, js files, css files and the like) except the Html file in the second package sub-file of each front-end project are automatically saved to a Content Delivery Network (CDN), and the respective Html files of one or more front-end projects in the Delivery stage are delivered to a front-end server (or an online server). At this time, the reference path publishpath of a static resource file in the online environment may include a storage path of the static resource file referenced by the static resource file in the CDN.
Further, when a user accesses a page path suffix path of a front-end project through the client, the front-end server sends a corresponding html file to the client; and running the Html file through the client to call all the first packing sub-files in the second packing sub-file of the front-end project, so as to display the page display effect of the front-end project.
In some embodiments, the project is a front-end project, the one or more projects including one or more front-end projects to be created. After the packed file of one or more front-end projects to be created is obtained, the project creating device loads the packed file and displays the page display effect of the one or more front-end projects.
And a browsing module (comprising a browser) in the device for creating the project loads the packed file, and displays the page display effect of one or more front-end projects to be created on the browsing module. Front-end personnel can discover problems based on the page display effect and modify the source code files of one or more front-end projects to be created.
Further, the device for creating the project loads the package file through the browser in the development stage, and displays the page display effect of one or more front-end projects in the development stage; and when the static resource files of the one or more front-end projects in the development stage are modified, updating the packed files, loading the updated packed files, and displaying the modified page display effect of the one or more front-end projects in the development stage. Wherein the modified static resource file of the one or more front-end projects of the development phase is used for testing the one or more front-end projects of the development phase in the testing phase.
In the development stage, the device for creating the project can directly load the packaged file obtained in the development stage through the browser and display one or more front-end projects in the development stage on a display module of the browser. For example, one or more application pages are exposed, or one or more Web pages are exposed. The developer can modify the static resource files of one or more front-end projects of the development phase on the front-end development tool based on the exposed pages. When a developer modifies the static resource files of one or more front-end projects in the development stage on the front-end development tool, the front-end development tool automatically updates the packaged files, and the browser automatically loads the updated packaged files and displays the modified page display effect of the one or more front-end projects in the development stage. And after the development stage is finished, sending the modified static resource files of the one or more front-end projects of the development stage to a test environment through the connection address of the test environment, and testing the one or more front-end projects of the development stage. Wherein, the connection address of the test environment may include a connection address of a server for front-end project testing.
In some embodiments, the project is a front-end project, the one or more projects including one or more front-end projects to be created. The method comprises the steps that in a testing stage, when a browsing instruction of a target front-end item in one or more front-end items in the testing stage is received, a second packaging sub-file corresponding to the target front-end item is determined from a packaging file in response to the browsing instruction; and sequentially loading one or more first packaging sub-files in the second packaging sub-file of the target front-end project through the browser, and displaying the page display effect of the target front-end project.
When a tester executes browsing operation on one front-end item in one or more front-end items in the testing stage through a browser, the front-end item can be used as a target front-end item, and the browser receives a browsing instruction of the target front-end item. Then, in response to the browsing instruction, the browser may determine a second packaging sub-file of the target front-end item from the packaging files, load a first packaging sub-file of the second packaging sub-file, and then display the target front-end item on a display module of the browser.
Further, the tester may continue to perform the browsing operation on another front-end item of the one or more front-end items of the testing phase until the browsing operation is performed on all the one or more front-end items of the testing phase, and the tester may modify the static resource files of some or all front-end items of the one or more front-end items of the testing phase based on the exposed one or more front-end items of the testing phase. When the static resource file of part of the front-end project (or all the front-end projects) is modified, the modified static resource file of the part of the front-end project (or all the front-end projects) is repackaged to obtain an updated packaged file. And continuously executing browsing operation on each front-end project in part of the front-end projects (or all the front-end projects) to check the modified part of the front-end projects (or all the front-end projects) until the test is finished, sending the static resource files of one or more front-end projects which pass the test stage of the test to the publishing server, and packaging the received static resource files of one or more front-end projects on the publishing server by the manager and then publishing the packaged static resource files to the online environment.
It should be noted that the apparatus for creating an item repackages the modified static resource file of part of the front-end item (or all the front-end items) to obtain an updated packaged file, and the process of packaging the static resource file of one or more items in the test phase to obtain a packaged file is the same as that described above, which is not repeated here.
Exemplarily, taking a project as a front-end project and one or more projects as one or more front-end projects to be created as an example, in combination with a packaging diagram of a front-end project shown in fig. 3, a specific process of a method for creating a project may include:
acquiring configuration information of a front-end project, wherein the configuration information comprises first configuration information and second configuration information, and the first configuration information comprises an identifier of a front-end project 1 and an identifier of a front-end project 2; the second configuration information comprises an identification of the front-end item 3 and an identification of the front-end item 4.
In a development phase, a packaging inlet of a front-end development tool Webpack in a device for creating a project receives an input folder path; the folder path is a path for saving folders of all front-end projects in the front-end project.
Then, the front-end development tool Webpack acquires the static resource files of the front-end project 1 and the static resource files of the front-end project 2 according to the folder path and the front-end project 1 identifier and the front-end project 2 identifier in the first configuration information, and does not acquire the static resource files of other front-end projects except the front-end project 1 and the front-end project 2 in all the front-end projects; newly building a cache file; and according to the development and packaging rules in the development and packaging configuration file, respectively packaging the static resource file of the front-end project 1 and the static resource file of the front-end project 2 to obtain a packaged file corresponding to the front-end project 1 and a packaged file corresponding to the front-end project 2, and storing the packaged files into a cache file to obtain a packaged file. The developing and packaging rules can include respectively packaging the static resource files of each front-end project in the static resource files of one or more front-end projects in the developing stage.
And finally, the project creating device directly loads the packed file in the development stage through the browser and displays the page display effect of the front-end project 1 and the front-end project 2 on a display module of the browser. The developer can modify the static resource files of the front-end project 1 and the front-end project 2 on the front-end development tool Webpack based on the exhibited pages until the developer determines that the exhibited pages meet the development requirements and considers that the development is completed. And sending the developed static resource files of the front-end project 1 and the front-end project 2 to the test environment through the connection address of the test environment.
In the testing stage, the packaging entry of the front-end development tool Webpack receives an input folder path.
Then, the front-end development tool Webpack acquires the static resource files of the developed front-end project 3 and the static resource files of the front-end project 4 according to the folder path and the front-end project 3 identifier and the front-end project 4 identifier in the second configuration information, and does not acquire the static resource files of other front-end projects except the front-end project 3 and the front-end project 4 in all the front-end projects; creating an entity file again, and marking the static resource file of the front-end project 3 and the static resource file of the front-end project 4 according to a test packaging rule in the test packaging configuration file; packing the static resource files of each file type of the front-end project 3 to obtain a plurality of second packing subfiles corresponding to the front-end project 3, wherein the plurality of second packing subfiles corresponding to the front-end project 3 form a first packing subfile of the front-end project 3; packing the static resource files of each file type of the front-end item 4 to obtain a plurality of second packing subfiles corresponding to the front-end item 4, wherein the plurality of second packing subfiles corresponding to the front-end item 4 form a first packing subfile of the front-end item 4; and saving the first pack sub-file of the front-end project 3 and the first pack sub-file of the front-end project 4 into the entity file to obtain a packed file.
Taking the front-end item 3 as an example, the plurality of second packaging sub-files corresponding to the front-end item 3 include js files, css files, picture files, and index. Html can be an Html file issued to an online server, so that when a user accesses a page path suffix path of the front-end page 3 through a client, the index.html is run; js files may include test.js; css files may include test.css; the picture file may include a1.png, a2.png, etc.; cs refers to picture files.
Finally, the device for creating the project loads the packaging file in the testing stage through the browser, and the front end project 3 and the front end project 4 are displayed on a display module of the browser. The tester can modify the static resource files of the front-end project 3 and/or the front-end project 4 on the Webpack based on the displayed page until the tester determines that the testing of the front-end project 3 and the front-end project 4 is completed, the static resource files of the front-end project 3 and the front-end project 4 after the testing is passed are sent to the publishing server, and the manager packages the received static resource files of the front-end project 3 and the front-end project 4 on the publishing server and then publishes the static resource files to the online environment.
It can be understood that the device for creating the project acquires configuration information of one or more front-end projects to be created in the front-end project, wherein the configuration information includes an identifier of the one or more front-end projects to be created; receiving an input folder path through a packaging entry of the front-end project; the folder path is a path for saving folders of all front-end items in the front-end project, that is, the folder for saving all front-end items in the front-end project can be located through the folder path; then, by using the identifier of the one or more front-end items to be created in the configuration information, the one or more front-end items to be created can be located in the folder for storing all the front-end items in the front-end project; therefore, according to the folder path and the configuration information, the static resource files of the one or more front-end projects to be created can be obtained and packaged to obtain a packaged file; because only the static resource files of the one or more front-end projects to be created are packaged, but not the static resource files of all the front-end projects in the front-end project, other front-end projects irrelevant to the one or more front-end projects to be created in the front-end project are prevented from being mixed into a packaging flow, and the packaging workload is reduced; finally, loading the packed file and displaying the page display effect of the one or more front-end projects to be created; the time consumption for creating the one or more front-end projects can be reduced because the packaging workload in the process of creating the one or more front-end projects is reduced.
It will be appreciated that the above method may be implemented by an apparatus for creating a project. The means for creating an item comprises hardware structures and/or software modules adapted to perform the respective functions in order to implement the above-mentioned functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
In the embodiment of the present application, the device for creating a project and the like may be divided into functional modules according to the method example, for example, each functional module may be divided for each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
In the case of dividing each functional module by corresponding functions, fig. 4 shows a possible structural schematic diagram of the apparatus for creating an item according to the above embodiment, where the apparatus for creating an item 4 includes: a configuration information acquisition module 41 and a packing module 42. The configuration information acquiring module 41 is configured to acquire configuration information of one or more projects to be created in a project; the configuration information includes an identification of one or more items. A packaging module 42 for receiving an input folder path through a packaging entry of the project; the folder path is a path of folders used for saving all projects in the project; and acquiring the static resource files of one or more projects according to the folder path and the configuration information, and packaging the static resource files of one or more projects to obtain a packaged file.
In one possible embodiment, the configuration information includes first configuration information; the first configuration information includes an identification of one or more projects of the development phase. The configuration information obtaining module 41 is configured to obtain configuration information of one or more projects to be created in a project, and includes: a configuration information obtaining module 41, configured to obtain first configuration information from a development project array in a development phase; the first configuration information is added by the developer in the development project array.
In another possible embodiment, the packing module 42 includes: a packaging module 421 is developed. The packing module 42 is configured to obtain the static resource files of one or more items according to the folder path and the configuration information, and pack the static resource files of one or more items to obtain a packed file, including: the development packaging module 421 is configured to create a new cache file in a development phase; and acquiring static resource files of one or more projects in the development stage according to the folder path and the identification of the one or more projects in the development stage, and packaging the static resource files of the one or more projects in the development stage to a cache file to obtain a packaged file.
In another possible implementation, the one or more items include: one or more front-end items to be created. The device still includes: the browsing module 43 is configured to obtain the static resource files of the one or more projects in the development stage according to the folder path and the identifiers of the one or more projects in the development stage, package the static resource files of the one or more projects in the development stage into a cache file, obtain the package file, load the package file through a browser, and display a page display effect of the one or more front-end projects in the development stage.
In another possible embodiment, the packaging module 42 is further configured to update the packaging file after the static resource file of the one or more front-end projects in the development phase is modified after the packaging file is loaded through the browser and the page display effect of the one or more projects in the development phase is displayed. The browsing module 43 is further configured to load the updated package file, and display a modified page display effect of one or more front-end projects in the development phase.
In another possible embodiment, the modified static resource file of the one or more front-end projects of the development phase is used for testing the one or more front-end projects of the development phase in the testing phase.
In another possible embodiment, the configuration information includes second configuration information; the second configuration information includes an identification of one or more items of the testing phase. The configuration information obtaining module 41 is configured to obtain configuration information of one or more projects to be created in a project, and includes: a configuration information obtaining module 41, configured to obtain second configuration information from the test item array in the test stage; the second configuration information is added by the developer in the test item array.
In another possible embodiment, the packing module 42 includes: the packing module 422 is tested. The packing module 42 is configured to obtain the static resource files of one or more items according to the folder path and the configuration information, and pack the static resource files of one or more items to obtain a packed file, including:
a test packing module 422 to: in the testing stage, an entity file is newly built; acquiring static resource files of one or more projects in a testing stage according to the folder path and the identification of the one or more projects in the testing stage; acquiring the file type of each static resource file in the static resource files of one or more projects in the testing stage; marking the corresponding static resource files by adopting the file type of each static resource file, the identification of one or more projects in the testing stage and preset identification information; the preset identification information comprises a path of an entity file; performing classified packing on the marked static resource files of each project to obtain one or more first packed sub-files; and respectively packaging one or more first packaged sub-files of one or more items in the testing stage to obtain one or more second packaged sub-files, and storing the one or more second packaged sub-files to the entity file to obtain a packaged file.
In another possible implementation, the one or more items include: one or more front-end items to be created. The device still includes: a browsing module 43. The browsing module 43 is configured to: after one or more first packing sub-files of one or more items in the testing stage are respectively packed to obtain one or more second packing sub-files, the one or more second packing sub-files are saved to an entity file, and after the packing files are obtained, when a browsing instruction of a target front-end item in one or more front-end items in the testing stage is received, the second packing sub-file of the target front-end item is determined from the packing files in response to the browsing instruction; and sequentially loading one or more first packing sub-files in the second packing sub-file of the target front-end project, and displaying the page display effect of the target front-end project.
In another possible implementation, the preset identification information further includes a reference relationship between the static resource files. The test packing module 422 is configured to mark the corresponding static resource file by using the file type of each static resource file, the identifier of one or more items in the test phase, and preset identifier information, and includes:
the test packing module 422 is specifically configured to: obtaining a reference path of one or more static resource files according to the reference relationship among the static resource files; the reference path represents a storage path of the static resource file referenced by the static resource file; obtaining entity file storage paths of the static resource files of one or more projects in the testing stage according to the file type of each static resource file, the identification of one or more projects and the paths of the entity files; and marking the corresponding static resource files by utilizing the reference paths of the one or more static resource files and the entity file storage paths of the static resource files of the one or more projects in the testing stage.
In another possible implementation, the second configuration information further includes page path suffixes of respective one or more front-end items of the testing phase; the page path suffix is combined with the access path of the project to characterize the page link of the front end project to which the suffix belongs.
Fig. 5 shows a possible structural diagram of the server involved in the above-described embodiment, in the case of an integrated unit. The server 5 may include: a processor 501, a memory 502, and a communication module 503. The processor 501 is used for controlling and managing the actions of the server. The memory 502 is used for storing program codes and data of the server, such as a method for creating a project, and obtaining configuration information of one or more projects to be created in a project. The communication module 503 is configured to support communication between the server and other network entities to implement functions such as data interaction, for example, the communication module 503 supports communication between the server and the terminal device to implement a data interaction function.
The processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 501 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 502 is used to store at least one instruction for execution by processor 501 to implement a method of creating a project as provided by embodiments of the present application.
Embodiments of the present application further provide a computer storage medium, where the computer storage medium includes computer instructions, and when the computer instructions are executed on the server, the server is caused to perform the functions or steps in the foregoing method embodiments. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
Embodiments of the present application further provide a computer program product, which, when running on the server, causes the server to perform the functions or steps in the above method embodiments.
Through the description of the above embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of creating an item, the method comprising:
acquiring configuration information of one or more projects to be created in a project; the configuration information comprises an identification of the one or more items;
receiving an input folder path through a packaging entry of the project; the folder path is a path of folders used for saving all projects in the project;
and acquiring the static resource files of the one or more projects according to the folder path and the configuration information, and packaging the static resource files of the one or more projects to obtain a packaged file.
2. The method of claim 1, wherein the configuration information comprises first configuration information; the first configuration information includes an identification of one or more projects of a development phase;
the acquiring configuration information of one or more projects to be created in a project includes:
in the development stage, acquiring the first configuration information from a development project array; the first configuration information is added in the development project array by a developer.
3. The method of claim 2, wherein the obtaining the static resource files of the one or more items according to the folder path and the configuration information, and packaging the static resource files of the one or more items to obtain a packaged file comprises:
in the development stage, a cache file is newly built;
and acquiring static resource files of the one or more projects in the development stage according to the folder path and the identification of the one or more projects in the development stage, and packaging the static resource files of the one or more projects in the development stage to the cache file to obtain the packaged file.
4. The method of claim 3, wherein the one or more items comprise: one or more front-end items to be created;
after the obtaining of the static resource files of the one or more projects in the development phase according to the folder path and the identifiers of the one or more projects in the development phase, and packaging the static resource files of the one or more projects in the development phase into the cache file to obtain the packaged file, the method further includes:
and loading the packed file through a browser, and displaying the page display effect of one or more front-end projects in the development stage.
5. The method of claim 1, wherein the configuration information comprises second configuration information; the second configuration information comprises an identification of one or more items of a testing phase;
the acquiring configuration information of one or more projects to be created in a project includes:
in the test stage, acquiring the second configuration information from a test item array; the second configuration information is added in the test item array by a developer.
6. The method of claim 5, wherein the obtaining the static resource files of the one or more items according to the folder path and the configuration information, and packaging the static resource files of the one or more items to obtain a packaged file comprises:
in the testing stage, an entity file is newly built;
acquiring static resource files of one or more items in the testing stage according to the folder path and the identification of the one or more items in the testing stage;
acquiring the file type of each static resource file in the static resource files of one or more projects in the test stage;
marking the corresponding static resource files by adopting the file type of each static resource file, the identification of one or more projects in the test stage and preset identification information; the preset identification information comprises a path of the entity file;
performing classified packing on the marked static resource files of each project to obtain one or more first packed sub-files;
and respectively packaging the one or more first packaged sub-files of the one or more items in the testing stage to obtain one or more second packaged sub-files, and storing the one or more second packaged sub-files to the entity file to obtain the packaged file.
7. The method of claim 6, wherein the one or more items comprise: one or more front-end items to be created;
after the packaging the one or more first packaged sub-files of the respective one or more items in the testing phase to obtain one or more second packaged sub-files, and saving the one or more second packaged sub-files to the entity file to obtain the packaged file, the method further includes:
when a browsing instruction of a target front-end item in the one or more front-end items in the testing stage is received, determining a second packaging sub-file corresponding to the target front-end item from the packaging files in response to the browsing instruction;
and sequentially loading one or more first packing sub-files in the second packing sub-file of the target front-end project through a browser, and displaying the page display effect of the target front-end project.
8. An apparatus for creating an item, the apparatus comprising:
the system comprises a configuration information acquisition module, a configuration information acquisition module and a configuration information acquisition module, wherein the configuration information acquisition module is used for acquiring configuration information of one or more projects to be created in project engineering; the configuration information comprises an identification of the one or more items;
the packaging module is used for receiving an input folder path through a packaging inlet of the project; the folder path is a path of folders used for saving all projects in the project; and acquiring the static resource files of the one or more projects according to the folder path and the configuration information, and packaging the static resource files of the one or more projects to obtain a packaged file.
9. A server, characterized in that the server comprises: a processor and a memory for storing processor-executable instructions;
wherein the processor is configured to execute the instructions to cause the server to perform the method of creating a front-end item of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon computer instructions which, when run on a server, cause the server to perform a method of creating a front-end item, implementing any of claims 1-7.
CN202010567020.2A 2020-06-19 2020-06-19 Method and device for creating project Pending CN111724133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010567020.2A CN111724133A (en) 2020-06-19 2020-06-19 Method and device for creating project

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010567020.2A CN111724133A (en) 2020-06-19 2020-06-19 Method and device for creating project

Publications (1)

Publication Number Publication Date
CN111724133A true CN111724133A (en) 2020-09-29

Family

ID=72567777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010567020.2A Pending CN111724133A (en) 2020-06-19 2020-06-19 Method and device for creating project

Country Status (1)

Country Link
CN (1) CN111724133A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112230985A (en) * 2020-10-23 2021-01-15 微民保险代理有限公司 Static file flow, applet version management method and device and computer equipment
CN113064632A (en) * 2021-04-07 2021-07-02 北京读我网络技术有限公司 Front-end project publishing method and device
CN113760351A (en) * 2021-03-24 2021-12-07 北京京东拓先科技有限公司 Project uploading method and device, electronic equipment and computer readable medium
CN115309376A (en) * 2022-08-25 2022-11-08 北京泰迪熊移动科技有限公司 Application creation method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202083A (en) * 2015-04-30 2016-12-07 阿里巴巴集团控股有限公司 Resource packaging system, method and device for web page
CN108829430A (en) * 2018-06-19 2018-11-16 厦门海迈科技股份有限公司 Java Web project update method and relevant apparatus based on Eclipse and Tomcat
CN109032631A (en) * 2018-07-12 2018-12-18 腾讯科技(深圳)有限公司 Application program service packs acquisition methods, device, computer equipment and storage medium
CN110286917A (en) * 2019-05-21 2019-09-27 深圳壹账通智能科技有限公司 File packing method, device, equipment and storage medium
CN111273898A (en) * 2020-02-25 2020-06-12 安徽以萨数据技术有限公司 Web front-end code automatic construction method, system and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202083A (en) * 2015-04-30 2016-12-07 阿里巴巴集团控股有限公司 Resource packaging system, method and device for web page
CN108829430A (en) * 2018-06-19 2018-11-16 厦门海迈科技股份有限公司 Java Web project update method and relevant apparatus based on Eclipse and Tomcat
CN109032631A (en) * 2018-07-12 2018-12-18 腾讯科技(深圳)有限公司 Application program service packs acquisition methods, device, computer equipment and storage medium
CN110286917A (en) * 2019-05-21 2019-09-27 深圳壹账通智能科技有限公司 File packing method, device, equipment and storage medium
CN111273898A (en) * 2020-02-25 2020-06-12 安徽以萨数据技术有限公司 Web front-end code automatic construction method, system and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112230985A (en) * 2020-10-23 2021-01-15 微民保险代理有限公司 Static file flow, applet version management method and device and computer equipment
CN112230985B (en) * 2020-10-23 2024-04-05 微民保险代理有限公司 Static file flow, applet version management method and device and computer equipment
CN113760351A (en) * 2021-03-24 2021-12-07 北京京东拓先科技有限公司 Project uploading method and device, electronic equipment and computer readable medium
CN113064632A (en) * 2021-04-07 2021-07-02 北京读我网络技术有限公司 Front-end project publishing method and device
CN115309376A (en) * 2022-08-25 2022-11-08 北京泰迪熊移动科技有限公司 Application creation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3342145B1 (en) Deep linking to mobile application states through programmatic replay of user interface events
CN111724133A (en) Method and device for creating project
RU2673403C2 (en) Website access method, device and website system
US8630978B2 (en) Method of bi-directional synchronization of user data
EP3035191B1 (en) Identifying source code used to build executable files
WO2021184725A1 (en) User interface test method and apparatus, storage medium, and computer device
CN102567516B (en) Script loading method and device
CN105049486A (en) Version management and file pulling control methods for static files, version management and file pulling control devices, and version control system
CN108228818A (en) Web page resources loading method and device, electronic equipment and storage medium
US11625253B2 (en) Application-level runtime environment for executing applications native to mobile devices without full installation
US9652220B2 (en) Zero down-time deployment of new application versions
US11741002B2 (en) Test automation systems and methods using logical identifiers
US9772930B2 (en) Techniques for evaluating applications through use of an auxiliary application
CN117112060A (en) Component library construction method and device, electronic equipment and storage medium
CN112395437B (en) 3D model loading method and device, electronic equipment and storage medium
CN113377458B (en) Plug-in management method and device, electronic equipment and storage medium
US11347523B2 (en) Updated shared library reloading without stopping the execution of an application
CN111596997B (en) UI information request method, device, terminal and storage medium
CN110327626B (en) Virtual server creation method and device
WO2021223544A1 (en) Application starting method and related device
CN114676372A (en) Data processing method and device for web game, electronic equipment and storage medium
Chandra et al. Installing RQDA
CN116679912A (en) Code generation method, apparatus, device, storage medium, and computer program
CN117369822A (en) Offline compiling method and device, electronic equipment and readable storage medium
CN117435837A (en) Application page parsing method, device, equipment and 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