CN115098186A - Project processing method and device, computer equipment and storage medium - Google Patents

Project processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115098186A
CN115098186A CN202210699250.3A CN202210699250A CN115098186A CN 115098186 A CN115098186 A CN 115098186A CN 202210699250 A CN202210699250 A CN 202210699250A CN 115098186 A CN115098186 A CN 115098186A
Authority
CN
China
Prior art keywords
target
configuration
project
authority
file
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
CN202210699250.3A
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202210699250.3A priority Critical patent/CN115098186A/en
Publication of CN115098186A publication Critical patent/CN115098186A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application belongs to the field of data processing, and relates to a project processing method, which comprises the following steps: packaging a starting command of the vite development server based on a scaffold tool; reading a configuration file of a target item; acquiring configuration data corresponding to the vite development server and transmitting the configuration data into a configuration file; converting all configuration objects in the configuration file into target configuration objects corresponding to the vite development server; reading a main page file under an appointed directory of a target project, adding appointed label reference, and generating a target entry file corresponding to a vite development server; exporting the target configuration object into the target entry file, and executing a starting command to start the target project. The application also provides a project processing device, computer equipment and a storage medium. In addition, the present application also relates to a blockchain technology, and the target configuration object can be stored in the blockchain. By the project upgrading method, development workload of developers can be reduced, and processing efficiency of project upgrading is improved.

Description

Project processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a project processing method and apparatus, a computer device, and a storage medium.
Background
Currently, the mainstream front-end development tool in the industry mainly takes Webpack as a main part, and the local running of a front-end project generally adopts a Webpack-dev-server mode, so that a source code and a third-party dependent compiling process can be packed together at one time when the project is started. As the volume of the project increases, the time consumed for starting the method can be obviously increased, and the time required for hot updating in the development process can also be increased, thereby greatly influencing the efficiency of developers. To solve this problem, communities gradually explore the packaging mode of unbundles to tools such as esbuild and swc. At present, the hottest mote is used as a vite development server, the vite adopts an ESM file originally supported by a browser, packaging is not needed, the file is compiled and introduced only in use, the development and compilation time is greatly shortened, and the vite development server can be started in seconds. However, in the existing processing mode of upgrading an existing project by using a vite development server, a new entry file and a large amount of configuration need to be introduced, the project is greatly improved, the development workload of developers is large, and the processing efficiency is low.
Disclosure of Invention
An embodiment of the present application aims to provide a project processing method, a project processing apparatus, a computer device, and a storage medium, so as to solve the problems that in an existing processing manner for upgrading an existing project by using a vite development server, a new entry file and a large amount of configuration need to be introduced, the project is greatly modified, the development workload of developers is large, and the processing efficiency is low.
In order to solve the above technical problem, an embodiment of the present application provides a project processing method, which adopts the following technical solutions:
packaging a start command of the vite development server based on a preset scaffold tool;
reading a configuration file of a target item;
acquiring preset configuration data corresponding to the vite development server, and transmitting the configuration data into the configuration file;
converting all configuration objects contained in the configuration file into target configuration objects corresponding to the vite development server;
reading a main page file under the specified directory of the target project, adding specified label reference to the main page file, and generating a target entry file corresponding to the note development server;
exporting the target configuration object into the target entry file, and executing the starting command to start the target project.
Further, after the steps of exporting the target configuration object into the target entry file and executing the launch command to launch the target item, the method further includes:
acquiring identification information of the target project;
determining target authority configuration information corresponding to the identification information based on a preset authority data table;
acquiring the routing information of the target project;
determining a target route corresponding to the target authority configuration information from the routing information;
and carrying out authority configuration processing on the target item based on a preset authority configuration component and a preset authority configuration code to obtain a corresponding authority target item.
Further, the step of performing permission configuration processing on the target item based on a preset permission configuration component and a preset permission configuration code to obtain a corresponding permission target item specifically includes:
acquiring the authority configuration component and the authority configuration code;
adding the permission configuration component into the target route of the target project to obtain a first target project;
injecting the authority configuration code into the first target project to obtain a second target project;
and taking the second target item as the authority target item.
Further, the step of obtaining the routing information of the target item specifically includes:
acquiring the frame type of the target project;
acquiring a routing file of the target project based on the frame type;
and acquiring the routing information of the target item based on the routing file.
Further, the step of determining the target permission configuration information corresponding to the identification information based on a preset permission data table specifically includes:
calling the authority data table;
respectively matching the identification information with each identification in the authority data table based on a preset parallel comparison instruction, and screening out a target identification which is the same as the identification information from the authority data table;
extracting authority configuration information corresponding to the target identification from the authority data table;
and taking the authority configuration information as the target authority configuration information.
Further, after the step of performing permission configuration processing on the target item based on the preset permission configuration component and the preset permission configuration code to obtain a corresponding permission target item, the method further includes:
acquiring importance information of the target project;
determining a storage mode corresponding to the importance information;
and storing the authority target item based on the storage mode.
Further, the step of performing encapsulation processing on the start command of the vite development server based on the preset scaffold tool specifically includes:
calling the scaffold tool;
acquiring a preset packaging command;
and operating the packaging command through the scaffold tool so as to package the starting command of the vite development server.
In order to solve the above technical problem, an embodiment of the present application further provides a project processing apparatus, which adopts the following technical solutions:
the packaging module is used for packaging the start command of the vite development server based on a preset scaffold tool;
the reading module is used for reading the configuration file of the target item;
the first acquisition module is used for acquiring preset configuration data corresponding to the note development server and transmitting the configuration data into the configuration file;
the conversion module is used for converting all the configuration objects contained in the configuration file into target configuration objects corresponding to the vite development server;
the generation module is used for reading a main page file under the specified directory of the target project, adding specified label reference to the main page file and generating a target entry file corresponding to the vite development server;
and the starting module is used for exporting the target configuration object into the target entry file and executing the starting command to start the target project.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
packaging a start command of the vite development server based on a preset scaffold tool;
reading a configuration file of a target item;
acquiring preset configuration data corresponding to the vite development server, and transmitting the configuration data into the configuration file;
converting all configuration objects contained in the configuration file into target configuration objects corresponding to the vite development server;
reading a main page file under the specified directory of the target project, adding specified label reference to the main page file, and generating a target entry file corresponding to the note development server;
exporting the target configuration object into the target entry file, and executing the starting command to start the target item.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
packaging a start command of the vite development server based on a preset scaffold tool;
reading a configuration file of a target item;
acquiring preset configuration data corresponding to the vite development server, and transmitting the configuration data into the configuration file;
converting all configuration objects contained in the configuration file into target configuration objects corresponding to the vite development server;
reading a main page file under the specified directory of the target project, adding specified label reference to the main page file, and generating a target entry file corresponding to the note development server;
exporting the target configuration object into the target entry file, and executing the starting command to start the target project.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
according to the embodiment of the application, after a preset scaffold tool is used for packaging a start command of a vite development server, a configuration file of a target project and preset configuration data corresponding to the vite development server are read, the configuration data are transmitted into the configuration file, all configuration objects contained in the configuration file are converted into target configuration objects corresponding to the vite development server, then a main page file under a specified directory of the target project is read, specified label reference is added to the main page file, a target entry file corresponding to the vite development server is generated, finally the target configuration objects are exported into the target entry file, and the start command is executed to start the target project, so that the upgrading process of integrating the vite development service in the target project is completed. By adopting the project upgrading method of the embodiment of the application to upgrade the target project, the new creation of the entry file and the configuration file in the root directory of the target project can be avoided, the purpose of zero new zero configuration in the upgrading process of the integrated vite development service of the target project is realized, the development workload of developers is effectively reduced, the project maintenance cost is reduced, and the project upgrading processing efficiency is improved.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a project processing method according to the present application;
FIG. 3 is a schematic block diagram of one embodiment of an item processing apparatus according to the present application;
FIG. 4 is a block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein may be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the item processing method provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the item processing apparatus is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow diagram of one embodiment of a project processing method according to the present application is shown. The project processing method comprises the following steps:
step S201, performing encapsulation processing on the start command of the vite development server based on a preset scaffold tool.
In the present embodiment, an electronic device (e.g., a server/terminal device shown in fig. 1) on which the project processing method operates. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G/5G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
In this embodiment, Vite is a Web development construction tool developed by Vue, the author of which is yu xi, and is a development server imported based on a browser native ES module, in a development environment, a browser is used to parse import, and compiling and returning are performed on a server side as required, so that the concept of packaging is completely skipped, and the server is started up at any time. Meanwhile, support is provided for Vue files, hot updating is supported, and the speed of the hot updating does not become slow as modules increase. Roll-up packaging is used in a production environment. The scaffold tool described above is a pre-created vue-cli tool for encapsulating the capability of a lite development server to launch a project. Specifically, a preset encapsulation command can be run through the scaffold tool, so that the encapsulation processing of the start command of the vite development server is realized. The encapsulation command is specifically a life-cli-service command. Vue-cli-service is a service command commonly used by vue-cli tools, and a fee is the item name of the target item.
Step S202, reading the configuration file of the target item.
In this embodiment, the configuration file of the target item is specifically a fee. The frame type of the target item may include Vue frame or React frame, i.e. the target item belongs to Vue item or React item.
Step S203, obtaining preset configuration data corresponding to the vite development server, and transmitting the configuration data into the configuration file.
In this embodiment, the configuration data is a configuration required by the vite development server, and may be created and generated according to an actual use requirement preset. Configuration data of a vite development server is integrated in a configuration file of a target project and transmitted, so that the common configurations of entries, aliases, css, proxy servers, loaders and the like in the configuration file can be automatically analyzed. Specifically, the configuration data may be a viteplogin attribute, and the viteplogin attribute is newly added in the configuration file of the target project, so that a plug-in of a vite development server can be introduced, and the capability of the target project can be expanded.
Step S204, converting all configuration objects contained in the configuration file into target configuration objects corresponding to the vite development server.
In this embodiment, all configuration objects contained in the configuration file may be converted into target configuration objects corresponding to the vite development server in the form of plug-ins. Specifically, all configuration objects included in the configuration file may be named in a vite-plugin-xxx manner, for example, the target configuration object generated after the conversion may include vite-plugin-env-compatible, vite-plugin-identifier, and the like. The note development server is integrated into the target project by one key in a plug-in mode, so that the upgrade is very simple, and zero change of the existing project code can be realized.
Step S205, reading a main page file in the specified directory of the target project, adding a specified tag reference to the main page file, and generating a target entry file corresponding to the vite development server.
In this embodiment, the designated directory is a public directory, the main page file is an index. Html, and then a subsequent vite development server can find a corresponding target entry file by analyzing the script tag. The existing use mode introduced by the Vite official document is to create an entry file, a state. config. js configuration file and the like under a project root directory, but the mode needs to introduce a new file and a large amount of configuration, needs to greatly reform the project and is not friendly to upgrade the existing project. In the embodiment, the traditional entry file under the multiplex public directory is adopted, the html file of the entry is dynamically read, and the script tag is added to the index.
Step S206, exporting the target configuration object into the target entry file, and executing the start command to start the target item.
In this embodiment, the target configuration object obtained through conversion is exported into the target entry file, so that the upgrading process of integrating the vite development service in the target project can be completed. In addition, the upgraded target project can be started by executing the starting command, and the upgraded target project can enable the service function of the vite development server in the running process, namely the target project can enjoy the improvement of the development experience brought by the vite development server.
After a preset scaffold tool is used for packaging a start command of a vite development server, a configuration file of a target project and preset configuration data corresponding to the vite development server are read, the configuration data are transmitted into the configuration file, all configuration objects contained in the configuration file are converted into target configuration objects corresponding to the vite development server, a main page file under a specified directory of the target project is read, specified label citation is added into the main page file, a target entry file corresponding to the vite development server is generated, the target configuration objects are exported into the target entry file, and the start command is executed to start the target project, so that the upgrading process of integrating the vite development service in the target project is completed. By adopting the project upgrading method to upgrade the target project, the new establishment of the entry file and the configuration file in the root directory of the target project can be avoided, the purpose of zero new zero configuration in the upgrading process of the integrated vite development service of the target project is realized, the development workload of developers is effectively reduced, the cost of project maintenance is reduced, and the processing efficiency of project upgrading is improved.
In some optional implementations, after step S206, the electronic device may further perform the following steps:
and acquiring the identification information of the target item.
In this embodiment, the identification information may include an item name of the target item.
And determining target authority configuration information corresponding to the identification information based on a preset authority data table.
In this embodiment, the authority data table is a data table created in advance according to actual requirements and used for counting authority information of items, and the authority data table stores item name information of a plurality of items and authority configuration information corresponding to each item name information. The authority configuration information is information which is determined by a user in a user-defined mode in advance and manages specific authorities in each project.
And acquiring the routing information of the target item.
In this embodiment, the process of acquiring the routing information of the target item may include: firstly, acquiring a frame type of the target project; then obtaining a routing file of the target project based on the frame type; and subsequently acquiring the routing information of the target item based on the routing file.
And determining a target route corresponding to the target authority configuration information from the route information.
In this embodiment, the target route corresponds to a relevant route that needs to be subjected to authority management in the routing information.
And performing authority configuration processing on the target item based on a preset authority configuration component and a preset authority configuration code to obtain a corresponding authority target item.
In this embodiment, the permission configuration component may be a component for performing permission management on an item specifically, and the permission configuration component may be stored in a permission configuration file generated in advance. By adding high-level components into the route needing to be added with the authority, the authority can be managed for the route of the whole item. The authority configuration code can be a custom authority code added according to actual requirements, and custom control authority can be obtained by adding the authority configuration code in the target project. For the basic front-end project, the target project with the authority management function can be obtained by automatically adding the authority to the target project, so that the user can add the self-defined and injected authority configuration code to obtain the corresponding authority target project.
According to the method and the device, after the target project is upgraded, authority management processing can be intelligently and conveniently carried out on the target project, authority management is added through routing information in the target project, relevant authorities are automatically generated, so that a user can customize authority configuration codes, a complex authority management function is realized, the labor cost of project development can be effectively saved, the processing efficiency of authority management on the target project is improved, and the intelligence of authority management on the target project is improved.
In some optional implementation manners of this embodiment, performing, by the above-mentioned method, authority configuration processing on the target item based on a preset authority configuration component and a preset authority configuration code to obtain a corresponding authority target item, includes the following steps:
and acquiring the authority configuration component and the authority configuration code.
In this embodiment, after the routing information of the target item is acquired, an authority configuration file is pre-constructed, and then an authority configuration component for performing authority management on the item is automatically constructed in the authority management file. After the permission configuration component is created and generated, the permission configuration component is stored, so that the permission configuration component can be acquired based on a corresponding acquisition instruction in the following process. Similarly, after the authority configuration code is generated by writing, the authority configuration code is stored, so that the authority configuration code can be acquired based on a corresponding acquisition instruction in the following.
And adding the authority configuration component into the target route of the target project to obtain a first target project.
In this embodiment, the permission configuration component may be a high-order component, where the high-order component (high-order component) is similar to a high-order function, and is configured to receive the read component as an input and output a new read component, where the high-order component makes a code have reusability, logical property, and abstract features, and may hijack a render method and control a stages and a state, and the implementation principle of the high-order function includes that if a function operates another function, the other function is used as a parameter or the function is used as a return value. Specifically, a file can be newly created to encapsulate the high-order component, then the routing component and the preset field are set, the routing component is verified through the preset field, and then authority management is achieved, so that the corresponding first target project is obtained.
And injecting the authority configuration code into the first target project to obtain a second target project.
In this embodiment, the authority configuration code may be code data generated by writing in advance according to actual authority management requirements, and the authority configuration code may be injected into the first target item in a user-defined injection manner, so as to obtain the authority target item finally.
And taking the second target item as the authority target item.
According to the method and the device, the authority management is added in the target project by using the authority configuration component and the authority configuration code, so that the related authority is automatically generated, a complex authority management function is realized, the labor cost of project development can be effectively saved, and the intelligence of the authority management of the target project is improved.
In some optional implementation manners, the obtaining of the routing information of the target item includes the following steps:
and acquiring the frame type of the target item.
In this embodiment, the frame type may include a reach frame or an Vue frame.
And acquiring a routing file of the target item based on the frame type.
In this embodiment, it is necessary to determine whether an vue frame or an act frame is currently used, and then whether a routing file exists in the target item may be found out according to different frame characteristics, and if the frame type of the target item found at this time is an act frame, routing information may be obtained according to the routing file, and then the routing information is stored.
And acquiring the routing information of the target item based on the routing file.
According to the method and the device, the route file of the target project is obtained based on the frame type of the target project, and then the corresponding route information can be quickly obtained according to the route file, so that the target route can be quickly and accurately determined according to the obtained route information in the follow-up process.
In some optional implementation manners, the determining, based on a preset permission data table, target permission configuration information corresponding to the identification information includes the following steps:
and calling the authority data table.
In this embodiment, after creating and generating the authority data table, the authority data table is stored, so that the authority data table can be called out based on a corresponding call instruction in the following.
And respectively matching the identification information with each identification in the authority data table based on a preset parallel comparison instruction, and screening out a target identification which is the same as the identification information from the authority data table.
In this embodiment, the parallel compare instruction may be a single instruction stream multiple data (SIMD) instruction.
And extracting authority configuration information corresponding to the target identification from the authority data table.
In this embodiment, after the matching obtains the same target identifier as the identification information, the corresponding right configuration information may be further extracted from the right data table according to the target identifier as the target right configuration information corresponding to the target item.
And taking the authority configuration information as the target authority configuration information.
According to the method and the device, the corresponding data comparison information is obtained by simultaneously carrying out data comparison processing on the identification information and each identification in the authority data table in a one-to-one correspondence mode through the parallel computing capability of the parallel comparison instruction, and then the target identification identical to the identification information can be found out according to the data comparison information, so that the comparison processing speed between the identification information is effectively improved, the authority configuration information corresponding to the target identification can be found out quickly, and the generation speed of the target authority configuration information is effectively improved.
In some optional implementation manners of this embodiment, after the step of performing, based on a preset permission configuration component and a preset permission configuration code, permission configuration processing on the target item to obtain a corresponding permission target item, the electronic device may further perform the following steps:
and acquiring the importance information of the target item.
In this embodiment, the importance information of the target item may be obtained by querying a preset importance data table. In this case, an importance data table may be generated in advance, and importance information of each item may be stored in the importance data table. The importance information may include high importance, and of the importance, low importance. In addition, for different importance information, the importance data table may be preset with data storage modes corresponding to the various importance information. The specific storage mode corresponding to the high importance may be block chain storage, the storage mode in importance may be local storage, and the storage mode with low importance may be storage-free.
And determining a storage mode corresponding to the importance information.
In this embodiment, when the importance information of the target item is reached, the corresponding storage mode may be further searched from the importance data table based on the importance information of the target item.
And storing the authority target item based on the storage mode.
According to the method and the device, through acquiring the importance information of the target project, corresponding data storage can be carried out on projects with different importance information, the intelligence of data storage is effectively improved, and the data safety of the generated project with higher importance is also guaranteed.
In some optional implementations of this embodiment, step S201 includes the following steps:
and calling the scaffold tool.
In this embodiment, the scaffolding tool described above is a pre-created vue-cli tool for encapsulating the capability of a lite development server to launch a project.
And acquiring a preset packaging command.
In this embodiment, the encapsulate command is specifically a life-cli-service device command. Vue-cli-service is a service command commonly used by vue-cli tools, and a fee is the item name of the target item.
And operating the packaging command through the scaffold tool so as to package the starting command of the vite development server.
In this embodiment, by using the scaffold tool to run the package command, that is, by packaging the start command of the official vite development server by using the scaffold tool, the capability of the vite development server can be introduced without introducing a new dependency, and the execution of the update and upgrade of the subsequent target project is facilitated.
According to the method and the device, the preset packaging command is operated by utilizing the scaffold tool, so that the start command of the vite development server is packaged, the capability of the vite development server can be introduced under the condition of not introducing new dependence, and the rapid execution of the update and the upgrade of subsequent target projects is facilitated.
It is emphasized that, to further ensure the privacy and security of the target item, the target item may also be stored in a node of a blockchain.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, the processes of the embodiments of the methods described above can be included. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a project processing apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which is specifically applicable to various electronic devices.
As shown in fig. 3, the item processing apparatus 300 according to the present embodiment includes: the device comprises an encapsulation module 301, a reading module 302, a first acquisition module 303, a conversion module 304, a generation module 305 and an initiation module 306. Wherein:
the packaging module 301 is configured to package a start command of the vite development server based on a preset scaffold tool;
a reading module 302, configured to read a configuration file of a target item;
a first obtaining module 303, configured to obtain preset configuration data corresponding to the vite development server, and transmit the configuration data into the configuration file;
a conversion module 304, configured to convert all configuration objects included in the configuration file into target configuration objects corresponding to the vite development server;
a generating module 305, configured to read a main page file in an appointed directory of the target project, add an appointed tag reference to the main page file, and generate a target entry file corresponding to the vite development server;
a starting module 306, configured to export the target configuration object into the target entry file, and execute the starting command to start the target item.
In this embodiment, the operations executed by the modules or units respectively correspond to the steps of the item processing method of the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the item processing apparatus further includes:
the second acquisition module is used for acquiring the identification information of the target item;
the first determining module is used for determining target authority configuration information corresponding to the identification information based on a preset authority data table;
the third acquisition module is used for acquiring the routing information of the target project;
a second determining module, configured to determine, from the routing information, a target route corresponding to the target permission configuration information;
and the configuration module is used for carrying out authority configuration processing on the target item based on a preset authority configuration component and a preset authority configuration code to obtain a corresponding authority target item.
In this embodiment, the operations executed by the modules or units respectively correspond to the steps of the item processing method of the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the configuration module includes:
the first obtaining submodule is used for obtaining the authority configuration component and the authority configuration code;
the adding submodule is used for adding the authority configuration component into the target route of the target item to obtain a first target item;
the injection submodule is used for injecting the authority configuration code into the first target project to obtain a second target project;
and the first determining submodule is used for taking the second target item as the authority target item.
In this embodiment, the operations executed by the modules or units respectively correspond to the steps of the item processing method in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the second determining module includes:
the second obtaining submodule is used for obtaining the frame type of the target project;
a third obtaining submodule, configured to obtain a routing file of the target item based on the frame type;
and the fourth obtaining submodule is used for obtaining the routing information of the target project based on the routing file.
In this embodiment, the operations executed by the modules or units respectively correspond to the steps of the item processing method of the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the first determining module includes:
the first calling submodule is used for calling the authority data table;
the matching submodule is used for respectively matching the identification information with each identification in the authority data table based on a preset parallel comparison instruction, and screening out a target identification which is the same as the identification information from the authority data table;
the extraction submodule is used for extracting authority configuration information corresponding to the target identification from the authority data table;
and the second determining submodule is used for taking the authority configuration information as the target authority configuration information.
In this embodiment, the operations executed by the modules or units respectively correspond to the steps of the item processing method of the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the item processing apparatus further includes:
the fourth acquisition module is used for acquiring the importance information of the target project;
a third determining module, configured to determine a storage manner corresponding to the importance information;
and the storage module is used for storing and processing the authority target item based on the storage mode.
In this embodiment, the operations executed by the modules or units respectively correspond to the steps of the item processing method of the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the encapsulation module 301 includes:
the second calling submodule is used for calling the scaffold tool;
the fifth obtaining submodule is used for obtaining a preset packaging command;
and the packaging submodule is used for the scaffold tool to run the packaging command so as to package the starting command of the vite development server.
In this embodiment, the operations executed by the modules or units respectively correspond to the steps of the item processing method of the foregoing embodiment one by one, and are not described herein again.
In order to solve the technical problem, the embodiment of the application further provides computer equipment. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash Card (FlashCard), and the like, which are provided on the computer device 4. Of course, the memory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, the memory 41 is generally used for storing an operating system installed in the computer device 4 and various types of application software, such as computer readable instructions of a project processing method. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the project processing method.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
in the embodiment of the application, after a preset scaffold tool is used for packaging a start command of a vite development server, a configuration file of a target project and preset configuration data corresponding to the vite development server are read, the configuration data are transmitted into the configuration file, all configuration objects contained in the configuration file are converted into target configuration objects corresponding to the vite development server, then a main page file under a specified directory of the target project is read, a specified tag reference is added to the main page file, a target entry file corresponding to the vite development server is generated, finally the target configuration objects are exported into the target entry file, and the start command is executed to start the target project, so that the upgrading process of integrating the vite development service in the target project is completed. By adopting the project upgrading method of the embodiment of the application to upgrade the target project, the new creation of an entry file and a configuration file in the root directory of the target project can be avoided, the purpose of zero new zero configuration in the upgrading process of the integrated vite development service of the target project is realized, the development workload of developers is effectively reduced, the project maintenance cost is reduced, and the project upgrading processing efficiency is improved.
The present application further provides another embodiment, which is a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the item processing method as described above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
in the embodiment of the application, after a preset scaffold tool is used for packaging a start command of a vite development server, a configuration file of a target project and preset configuration data corresponding to the vite development server are read, the configuration data are transmitted into the configuration file, all configuration objects contained in the configuration file are converted into target configuration objects corresponding to the vite development server, then a main page file under a specified directory of the target project is read, a specified tag reference is added to the main page file, a target entry file corresponding to the vite development server is generated, finally the target configuration objects are exported into the target entry file, and the start command is executed to start the target project, so that the upgrading process of integrating the vite development service in the target project is completed. By adopting the project upgrading method of the embodiment of the application to upgrade the target project, the new creation of an entry file and a configuration file in the root directory of the target project can be avoided, the purpose of zero new zero configuration in the upgrading process of the integrated vite development service of the target project is realized, the development workload of developers is effectively reduced, the project maintenance cost is reduced, and the project upgrading processing efficiency is improved.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that modifications can be made to the embodiments described in the foregoing detailed description, or equivalents can be substituted for some of the features described therein. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A method of processing items, comprising the steps of:
packaging a start command of the vite development server based on a preset scaffold tool;
reading a configuration file of a target item;
acquiring preset configuration data corresponding to the vite development server, and transmitting the configuration data into the configuration file;
converting all configuration objects contained in the configuration file into target configuration objects corresponding to the vite development server;
reading a main page file under the specified directory of the target project, adding specified label reference to the main page file, and generating a target entry file corresponding to the vite development server;
exporting the target configuration object into the target entry file, and executing the starting command to start the target project.
2. The project processing method of claim 1, wherein after the steps of exporting the target configuration object into the target entry file and executing the launch command to launch the target project, further comprising:
acquiring identification information of the target project;
determining target authority configuration information corresponding to the identification information based on a preset authority data table;
acquiring the routing information of the target project;
determining a target route corresponding to the target authority configuration information from the route information;
and carrying out authority configuration processing on the target item based on a preset authority configuration component and a preset authority configuration code to obtain a corresponding authority target item.
3. The item processing method according to claim 2, wherein the step of performing the permission configuration processing on the target item based on a preset permission configuration component and a preset permission configuration code to obtain a corresponding permission target item specifically comprises:
acquiring the authority configuration component and the authority configuration code;
adding the permission configuration component into the target route of the target project to obtain a first target project;
injecting the authority configuration code into the first target project to obtain a second target project;
and taking the second target item as the authority target item.
4. The item processing method according to claim 2, wherein the step of obtaining the routing information of the target item specifically comprises:
acquiring the frame type of the target project;
acquiring a routing file of the target project based on the frame type;
and acquiring the routing information of the target item based on the routing file.
5. The item processing method according to claim 2, wherein the step of determining the target permission configuration information corresponding to the identification information based on a preset permission data table specifically includes:
calling the authority data table;
respectively matching the identification information with each identification in the authority data table based on a preset parallel comparison instruction, and screening out a target identification which is the same as the identification information from the authority data table;
extracting authority configuration information corresponding to the target identification from the authority data table;
and taking the authority configuration information as the target authority configuration information.
6. The item processing method according to claim 2, wherein after the step of performing the permission configuration processing on the target item based on the preset permission configuration component and the preset permission configuration code to obtain the corresponding permission target item, the method further comprises:
acquiring importance information of the target project;
determining a storage mode corresponding to the importance information;
and storing the authority target item based on the storage mode.
7. The project processing method according to claim 1, wherein the step of encapsulating the start command of the vite development server based on a preset scaffold tool specifically includes:
calling the scaffold tool;
acquiring a preset packaging command;
and operating the packaging command through the scaffold tool so as to package the starting command of the vite development server.
8. An item processing apparatus, comprising:
the packaging module is used for packaging the start command of the vite development server based on a preset scaffold tool;
the reading module is used for reading the configuration file of the target item;
the first acquisition module is used for acquiring preset configuration data corresponding to the note development server and transmitting the configuration data into the configuration file;
a conversion module, configured to convert all configuration objects contained in the configuration file into target configuration objects corresponding to the vite development server;
the generation module is used for reading a main page file under the specified directory of the target project, adding specified label reference to the main page file and generating a target entry file corresponding to the vite development server;
and the starting module is used for exporting the target configuration object into the target entry file and executing the starting command to start the target project.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the item processing method of any of claims 1 to 7.
10. A computer readable storage medium having computer readable instructions stored thereon which, when executed by a processor, implement the steps of the item processing method of any one of claims 1 to 7.
CN202210699250.3A 2022-06-20 2022-06-20 Project processing method and device, computer equipment and storage medium Pending CN115098186A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210699250.3A CN115098186A (en) 2022-06-20 2022-06-20 Project processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210699250.3A CN115098186A (en) 2022-06-20 2022-06-20 Project processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115098186A true CN115098186A (en) 2022-09-23

Family

ID=83291910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210699250.3A Pending CN115098186A (en) 2022-06-20 2022-06-20 Project processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115098186A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116069325A (en) * 2023-01-28 2023-05-05 深圳市明源云采购科技有限公司 Front-end project construction method, device, equipment and computer readable storage medium
CN116149760A (en) * 2023-04-21 2023-05-23 广州三晶电气股份有限公司 Front-end project packaging method and device based on Vue frame
CN117055949A (en) * 2023-10-11 2023-11-14 中博信息技术研究院有限公司 Method and system for automatically generating vite configuration

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116069325A (en) * 2023-01-28 2023-05-05 深圳市明源云采购科技有限公司 Front-end project construction method, device, equipment and computer readable storage medium
CN116069325B (en) * 2023-01-28 2023-08-04 深圳市明源云采购科技有限公司 Front-end project construction method, device, equipment and computer readable storage medium
CN116149760A (en) * 2023-04-21 2023-05-23 广州三晶电气股份有限公司 Front-end project packaging method and device based on Vue frame
CN116149760B (en) * 2023-04-21 2023-07-14 广州三晶电气股份有限公司 Front-end project packaging method and device based on Vue frame
CN117055949A (en) * 2023-10-11 2023-11-14 中博信息技术研究院有限公司 Method and system for automatically generating vite configuration
CN117055949B (en) * 2023-10-11 2024-02-09 中博信息技术研究院有限公司 Method and system for automatically generating vite configuration

Similar Documents

Publication Publication Date Title
CN115098186A (en) Project processing method and device, computer equipment and storage medium
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN113536185B (en) Application page loading method, storage medium and related equipment
CN114996619A (en) Page display method and device, computer equipment and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN110765610B (en) PDM integration method, PDM integration device, computer equipment and storage medium
CN108845864A (en) A kind of JVM rubbish recovering method and device based on spring frame
CN101794240A (en) Method and system for aggregating data content
CN113656044B (en) Android installation package compression method and device, computer equipment and storage medium
CN115203674A (en) Automatic login method, system, device and storage medium for application program
CN114565316A (en) Task issuing method based on micro-service architecture and related equipment
CN114625372A (en) Automatic component compiling method and device, computer equipment and storage medium
CN114090066A (en) User interface card view generation method and device, computer equipment and medium
CN112965721B (en) Project compiling method and device based on Android, computer equipment and storage medium
CN113032003B (en) Development file export method, development file export device, electronic equipment and computer storage medium
CN115344265A (en) Code generation method and device, computer equipment and storage medium
CN116595285B (en) Route generation method, device, computer equipment and storage medium
CN117008993A (en) Resource processing method, device, computer equipment and storage medium
CN115795209A (en) Method, device, equipment and medium for executing Eval function based on browser plug-in
CN114371886A (en) Front-end frame assembly conversion method and device, computer equipment and storage medium
CN110532165B (en) Application program installation package characteristic detection method, device, equipment and storage medium
CN116466945A (en) Data display method, device, computer equipment and storage medium
CN114996616A (en) Information generation method, device and equipment based on browser and storage medium
CN115712441A (en) Model deployment method and device, computer 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