CN117492812A - Method, system and storage medium for transmitting components - Google Patents

Method, system and storage medium for transmitting components Download PDF

Info

Publication number
CN117492812A
CN117492812A CN202311276905.7A CN202311276905A CN117492812A CN 117492812 A CN117492812 A CN 117492812A CN 202311276905 A CN202311276905 A CN 202311276905A CN 117492812 A CN117492812 A CN 117492812A
Authority
CN
China
Prior art keywords
component
warehouse
instruction
name
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
CN202311276905.7A
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.)
Zhongke Yungu Technology Co Ltd
Original Assignee
Zhongke Yungu 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 Zhongke Yungu Technology Co Ltd filed Critical Zhongke Yungu Technology Co Ltd
Priority to CN202311276905.7A priority Critical patent/CN117492812A/en
Publication of CN117492812A publication Critical patent/CN117492812A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a method, a system and a storage medium for transmitting components. The method is applied to the scaffold tool, and comprises the following steps: acquiring an uploading instruction aiming at a first component name; searching a first component corresponding to the first component name in a component warehouse according to the uploading instruction; under the condition that the first component is not found in the component warehouse, sending out prompt information; after the user perfects the component description information corresponding to the prompt information, generating a first component configuration file of the first component, wherein the component configuration file comprises a first component name; the first component and the first component profile are uploaded to the component repository to synchronize the first component to the component repository. The user can directly synchronize the front end subassembly that needs to the subassembly warehouse through the scaffold worker in, realizes the distribution sharing of front end subassembly, has improved the convenience and the work efficiency of operation, has reduced technological threshold and repeatability work, has solved the one-way loaded down with trivial details problem of introducing and updating of current scheme.

Description

Method, system and storage medium for transmitting components
Technical Field
The present application relates to the field of front-end development technologies, and in particular, to a method, a system, and a storage medium for transmitting a component.
Background
Front-end components are an integral part of the front-end development process. Some front-end systems use traditional "copy-and-paste" approaches to copy the front-end components from the A-project to the B-project. The copy-paste mode belongs to the one-time behavior. Whether the front-end component pasted is updated or not cannot be known in the front-end project, and the optimized content in the project cannot be uploaded to the front-end component. With the traditional copy-and-paste mode, a unified management center is lacking to centrally manage all front-end components. Existing front-end component distribution and sharing methods are mainly used for installing, managing and publishing code packages through an NPM package manager by means of NPM (Node Package Manager). The NPM package author modifies the code to upload to the code management repository, from which the front-end project developer manually downloads the updated code into the project code, which is a one-way update mechanism. Because of the mechanism limited by the NPM, the component codes cannot be modified to be shared into a code management warehouse, which is not beneficial to the iterative upgrade of the front-end component.
Disclosure of Invention
It is an object of embodiments of the present application to provide a method, system and storage medium for transmitting components to solve the problem of unidirectional introduction and lack of centralized management in the prior art.
To achieve the above object, a first aspect of the present application provides a method for transporting a component, applied to a scaffold tool, the method comprising:
acquiring an uploading instruction aiming at a first component name;
searching a first component corresponding to the first component name in a component warehouse according to the uploading instruction;
under the condition that the first component is not found in the component warehouse, sending out prompt information;
after the user perfects the component description information corresponding to the prompt information, generating a first component configuration file of the first component, wherein the component configuration file comprises a first component name;
the first component and the first component configuration file are uploaded from the local database to the component repository to synchronize the first component to the component repository.
In an embodiment of the present application, the method further comprises: after the first component is synchronized to the component warehouse, acquiring a downloading instruction aiming at the name of the first component; searching a second component and a second component configuration file corresponding to the first component name in the component warehouse according to the downloading instruction, wherein the second component configuration file comprises the second component name of the dependent component corresponding to the first component; searching a component warehouse for a dependent component with a component name being a second component name; in the event that a dependent component is found, the dependent component and the second component are downloaded to a local database.
In an embodiment of the present application, the method further comprises: after the first component is synchronized to the component warehouse, acquiring an update instruction aiming at the name of the first component; searching a third component corresponding to the first component name in the local database according to the updating instruction; determining whether a modification record exists in the third component in the local database; in the case that the third component has a modification record, updating the second component content of the third component in the local database according to the first component content included in the modification record; determining whether to update the third component according to the modification record in the case that the modification record does not exist in the third component; and under the condition that the third component is determined to be updated according to the modification record, updating the second component content of the third component in the local database by the third component content corresponding to the first component name in the component warehouse.
In an embodiment of the present application, determining whether the modification record exists in the third component in the local database includes: acquiring a first hash value corresponding to a second component, which is included in a second component configuration file; determining a second hash value corresponding to the third component; determining that the third component has a modification record under the condition that the first hash value is different from the second hash value; in the case that the first hash value is the same as the second hash value, it is determined that the third component does not have a modified record.
In an embodiment of the present application, the third component includes a plurality of files, each file includes sub-component content, and determining the second hash value corresponding to the third component includes: determining a file directory structure corresponding to the third component; determining a third hash value for each subcomponent content; traversing all third hash values according to the file directory structure to generate second hash values corresponding to the third components.
In an embodiment of the present application, the method further comprises: after the first component is synchronized to the component warehouse, acquiring a viewing instruction aiming at the component warehouse; and reading all the components of the component warehouse according to the viewing instruction, and generating a component list, wherein the component list comprises the component names of all the components of the component warehouse.
In an embodiment of the present application, the component description information includes a usage description file, an effect graph, and a usage case description file of the first component, and the method further includes: after the first component is synchronized to the component warehouse, acquiring a display instruction input by a user, wherein the display instruction refers to a command for displaying component description information; and searching the use instruction file, the effect diagram and the use case instruction file according to the display instruction, and displaying the use instruction file, the effect diagram and the use case instruction file on a display interface.
A second aspect of the present application provides a system for a transport assembly, comprising:
a scaffold tool comprising a processor configured to invoke instructions from a memory and when executing the instructions is capable of implementing a method for transferring components as described above;
the terminal comprises an interactive interface and a local database, wherein the interactive interface is used for acquiring an uploading instruction input by a user; storing a first component to be synchronized in a local database;
and the component warehouse is used for storing the components uploaded by the terminal and the component configuration file of each component and sharing the stored components with the terminal.
In an embodiment of the present application, further includes: and displaying an interface for the use description file, the effect graph and the use case description file of each component in the component warehouse.
Through the technical scheme, the uploading instruction aiming at the first component name is obtained; searching a first component corresponding to the first component name in a component warehouse according to the uploading instruction; under the condition that the first component is not found in the component warehouse, sending out prompt information; after the user perfects the component description information corresponding to the prompt information, generating a first component configuration file of the first component, wherein the component configuration file comprises a first component name; the first component and the first component profile are uploaded to the component repository to synchronize the first component to the component repository. The user can directly synchronize the front end subassembly that needs to the subassembly warehouse through the scaffold worker in, realizes the distribution sharing of front end subassembly, has improved the convenience and the work efficiency of operation, has reduced technological threshold and repeatability work, and the centralized management of being convenient for has solved the unidirectional introduction of current scheme and has lacked centralized management's problem.
Additional features and advantages of embodiments of the present application will be set forth in the detailed description that follows.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the present application and are incorporated in and constitute a part of this specification, illustrate embodiments of the present application and together with the description serve to explain, without limitation, the embodiments of the present application. In the drawings:
FIG. 1 schematically illustrates a flow diagram of a method for transporting components according to an embodiment of the present application;
FIG. 2 schematically illustrates a flow diagram of another method for transporting components according to an embodiment of the present application;
FIG. 3 schematically illustrates a flow diagram of yet another method for transporting components according to an embodiment of the present application;
FIG. 4 schematically illustrates a block diagram of a system for transmitting components according to an embodiment of the present application;
FIG. 5 schematically illustrates a block diagram of a system for transporting components according to a particular embodiment of the present application;
FIG. 6 schematically illustrates a block diagram of a scaffold tool according to an embodiment of the present application;
fig. 7 schematically shows a schematic structural diagram of a computer device according to an embodiment of the present application.
Description of the reference numerals
410. Scaffold tool 422 local database
420. Terminal 430 component repository
421. Interactive interface 440 presentation interface
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the specific implementations described herein are only for illustrating and explaining the embodiments of the present application, and are not intended to limit the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that, in the embodiment of the present application, directional indications (such as up, down, left, right, front, and rear … …) are referred to, and the directional indications are merely used to explain the relative positional relationship, movement conditions, and the like between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present application, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be regarded as not exist and not within the protection scope of the present application.
Fig. 1 schematically shows a flow diagram of a method for transporting components according to an embodiment of the present application. As shown in fig. 1, an embodiment of the present application provides a method for transporting components, applied to a scaffold tool, which may include the following steps.
S102, obtaining an uploading instruction aiming at the first component name.
S104, searching a first component corresponding to the first component name in the component warehouse according to the uploading instruction.
S106, sending out prompt information under the condition that the first component is not found in the component warehouse.
S108, after the user perfects the component description information corresponding to the prompt information, generating a first component configuration file of the first component, wherein the first component configuration file comprises a first component name.
S110, uploading the first component and the first component configuration file from the local database to the component repository to synchronize the first component to the component repository.
The scaffold tool is a global command line tool that can run by executing defined commands under any directory, and it also has the ability to create project initialization code files and directories. In an embodiment of the present application, the scaffold tool is a convenient command line tool for use by a developer that provides a series of commands for the operation of the front end components. In particular, scaffold tools may be developed through the NodeJS programming language. The component repository refers to a repository of front-end component code. For example, a common code management repository such as a Gitlab. The local database is a project catalog for developing development work actually by a developer, and the developer downloads or uploads the front-end component through a scaffold tool under the project catalog to realize the distribution of the front-end component. The front-end component is an indispensable component in the front-end development process, and the page can be decoupled according to functional logic by scattering the page into independent and combinable components, so that the maintainability of the page is improved.
The uploading instruction refers to an instruction for transmitting the front-end component from the local database to the component warehouse, and the uploading instruction carries a first component name of a first component included in the local database. The scaffold tool may obtain an upload instruction for the first component name, looking up the first component in the component repository. The first component refers to the front-end component to be transferred from the local database to the component repository. If the first component name does not exist in the component warehouse, the first component is not existed in the component warehouse. At this time, the scaffold tool issues a prompt message to prompt the user to supplement the component specification information mentioned in the prompt message. Component specification information includes, but is not limited to, whether the component is suitable for the PC side or the APP side, keywords for component search, usage description files (reacem. Md), effect graphs (snapshot. Png), usage case description files (usage. Md), and the like. The developer can select and use the front-end components according to the component specification information. After the user perfects the component description information corresponding to the prompt information, the scaffold tool generates a component configuration file of the first component. The component configuration file defines information such as structures, attributes, methods, slots, and the like inside the component. For example, a first component name component of the first component. The configuration file facilitates the invocation and use of components in the project and the componentized development in the project. After the component library is updated, the components in the project can be updated accordingly, so that maintainability and expandability of the project are improved. Further, the scaffold tool uploads the first component and the component profile to the component repository to synchronize the first component to the component repository.
Through the scheme, a user can directly synchronize the needed front end assembly into the assembly warehouse through the scaffold tool, so that the front end assembly is distributed and shared, the convenience and the working efficiency of operation are improved, the technical threshold and the repeated work are reduced, the centralized management is convenient, and the problems of unidirectional introduction and complicated updating of the existing scheme are solved.
Fig. 2 schematically illustrates a flow diagram of another method for transporting components according to an embodiment of the present application. As shown in fig. 2, an embodiment of the present application provides a method for transmitting a component, the method further including the steps of:
s202, after the first component is synchronized to the component warehouse, a downloading instruction aiming at the name of the first component is obtained.
S204, searching a second component and a second component configuration file corresponding to the first component name in the component warehouse according to the downloading instruction, wherein the second component configuration file comprises the second component name of the dependent component corresponding to the first component.
S206, searching the dependent component with the component name being the second component name in the component warehouse.
And S208, downloading the dependent component and the second component to a local database under the condition that the dependent component is found.
The second component refers to the front-end component to be transferred from the local repository to the local database. After the first component is synchronized to the component repository, the scaffold tool may obtain a download instruction for the first component name. Download instructions refer to instructions to transfer the front-end component from the component repository to the local database. For the first component uploaded to the component repository, the developer may update the component content, but its component name is unchanged. Therefore, the scaffold tool can search the second component corresponding to the first component name in the component warehouse according to the downloading instruction. The second component refers to a front-end component to be downloaded to the local database in the component repository corresponding to the first component name after the first component is synchronized to the component repository. And, after the first component of the component repository is updated, its corresponding component configuration file is updated. Therefore, the scaffold tool can also search the second component configuration file corresponding to the first component name according to the downloading instruction. It is understood that in embodiments of the present application, the first and second are relative terms. Specifically, the component configuration file may also include the name of the dependent component associated with the component. The scaffold tool can look up the dependent components of the second component by the second component name. If the second component does not have a dependent component. The scaffold tool may directly download the second component to the local database. If the second component has a dependent component, then the scaffold tool can download the second component and the dependent component to the local database if the dependent component is found based on the second component name. Therefore, the local database updating component can be transmitted to the component warehouse through the scaffold tool, and after the component warehouse updates the component, the component can be transmitted to the local database through the scaffold tool, so that a bidirectional updating mechanism and closed-loop management of the component are realized.
In one embodiment, the method further comprises: after the first component is synchronized to the component warehouse, acquiring a viewing instruction aiming at the component warehouse; and reading all the components of the component warehouse according to the viewing instruction, and generating a component list, wherein the component list comprises the component names of all the components of the component warehouse.
The view instruction is an instruction that indicates that all front-end components of the component repository are viewed. After the scaffold tool acquires the checking instruction, reading all components of the component warehouse according to the checking instruction, and forming a component list by the component names of all the components, and returning the component list in a list form.
Fig. 3 schematically shows a flow diagram of yet another method for transporting components according to an embodiment of the present application. As shown in fig. 3, the method further comprises the following steps.
S302, after the first component is synchronized to the component warehouse, an update instruction for the first component name is acquired.
S304, searching a third component corresponding to the first component name in the local database according to the updating instruction.
S306, judging whether a modification record exists in the third component in the local database, if yes, executing S308, and if not, executing S310.
S308, in the case that the third component is determined to be updated according to the modification record, updating the second component content of the third component in the local database according to the first component content included in the modification record.
And S310, updating the second component content of the third component in the local database by the third component content corresponding to the first component name in the component warehouse.
The update instruction refers to an update instruction for a first component name in the local database. The scaffold tool may search for a third component in the local database corresponding to the first component name according to the update instruction. The third component refers to a front-end component to be updated corresponding to the first component name in the component repository after the first component is synchronized to the component repository. The scaffold tool may determine whether a modification record exists for the third component in the local database to confirm whether its component contents have been modified. If the third component has a modification record, the scaffold tool further confirms whether to update the third component according to the modification record. This is because there may be corresponding optimized component content in the component repository and corresponding optimized component content in the modification record of the local database, at which time it is necessary to confirm with the user whether the third component is updated according to the modification record. The user may input an instruction through the operation interface to determine, if it is determined to update the third component according to the modification record, the first component content included in the modification record may be updated to update the second component content of the third component. The second component content is the current component content of the third component. The first component content refers to the latest version of the component content in the modification record. If it is determined that the third component is not to be updated according to the modification record, updating of the third component according to the modification record is prohibited, and optimized component content in the component repository may be selected for updating thereof. If the third component does not have the modification record, the scaffold tool can update the second component content of the third component in the local database by using the third component content corresponding to the first component name in the component warehouse. Therefore, a mechanism for updating and sharing the optimized front-end component can be realized, the component codes are subjected to customized management, and the working efficiency is improved.
In one embodiment, determining whether the modification record exists for the third component in the local database comprises: acquiring a first hash value corresponding to a second component, which is included in a second component configuration file; determining a second hash value corresponding to the third component; determining that the third component has a modification record under the condition that the first hash value is different from the second hash value; in the case that the first hash value is the same as the second hash value, it is determined that the third component does not have a modified record.
In one embodiment, the third component includes a plurality of files, each file including subcomponent content, and determining the corresponding second hash value of the third component includes: determining a file directory structure corresponding to the third component; determining a third hash value for each subcomponent content; traversing all third hash values according to the file directory structure to generate second hash values corresponding to the third components.
The component profile includes a hash value (hash). The hash value (hash) is a content hash value generated based on the component code, and is a string of hash strings generated by scanning the code of the component file of the current version, and by means of the hash string values, whether the component code has been changed can be distinguished, and the hash value is changed only when the component content is changed. The scaffold tool may obtain a first hash value corresponding to the second component included in the second component configuration file, and determine a second hash value corresponding to the third component. Specifically, the scaffold tool may determine a file directory structure corresponding to the third component, traverse the file directory structure of the component code using a recursive scheme, and obtain all files and hierarchical relationships under the file directory structure. The scaffold tool may combine the third hash value of each sub-component content included in the third component into a total hash value as the second hash value of the third component according to the file list order of the file directory structure for all traversed files. If the first hash value is not the same as the second hash value, the scaffold tool determines that the third component has a modification record. If the first hash value is the same as the second hash value, the scaffold tool determines that the third component does not have a modification record.
Specifically, the component configuration file may be a components json file, which may convert the component into json format, and easily transmit the component across languages. This format allows easy transfer of components from one system to another, and the surface presents problems during application development. The contents of the components json file include, but are not limited to, the following information: component name (name), component description information (description), component author (author), version number (version), hash value (hash), dependent component name (dependencies), component scope of applicability (scope). Where the component name (name) is the unique identifier of the component. The name is used when the component is uploaded and downloaded. The dependent component names (dependencies) indicate in object form whether the current component needs to depend on other components and their corresponding version numbers when in use. Component scope (scope) identifies what scope the current component is applicable to in an array. For example [ "PC" ] indicates that only the PC side is applicable.
In one embodiment, the component description information includes a usage description file, an effect graph, and a use case description file for the first component, the method further comprising: after the first component is synchronized to the component warehouse, acquiring a display instruction input by a user, wherein the display instruction refers to a command for displaying component description information; and searching the use instruction file, the effect diagram and the use case instruction file according to the display instruction, and displaying the use instruction file, the effect diagram and the use case instruction file on a display interface.
Specifically, a developer may enter a presentation instruction through a scaffold tool when needed to use a front-end component in a local database or component repository. Aiming at the front-end assembly required to be displayed by a user in the display instruction, the scaffold tool can find the assembly description information of the corresponding front-end assembly according to the display instruction and display the assembly description information in the display interface. The component description information includes, but is not limited to, a usage description file (READM. Md), an effect map (snapshot. Png), a usage case description file (USAGE. Md), and the like. Through the visual display interface, a developer can quickly master the front-end component and the corresponding access method and the use description thereof.
Through the technical scheme, the components can be updated in the local database based on simple commands input by the scaffold tool, the components can be transmitted to the component warehouse through the scaffold tool, and the components can be transmitted to the local database through the scaffold tool after being updated in the component warehouse. Users can directly realize the distribution sharing of the front end component through the scaffold tool, thereby improving the convenience and the working efficiency of operation, reducing the technical threshold and the repeated work and solving the problem of complex unidirectional introduction and updating of the prior proposal. And the front end component can be updated through the scaffold tool, so that customized functional characteristics are met, and a component bidirectional updating mechanism and closed-loop management are realized. The developer can also quickly master the front-end component and the corresponding access method and the use instruction thereof through the display interface.
Fig. 4 schematically illustrates a block diagram of a system for transmitting components according to an embodiment of the present application. As shown in fig. 4, an embodiment of the present application provides a system for transmitting a component, including:
the scaffold tool 410 includes a processor configured to call instructions from a memory and when executing the instructions can implement the method for transferring components as described above.
The terminal 420 comprises an interaction interface 421 and a local database 422, wherein the interaction interface 421 is used for acquiring an uploading instruction input by a user; the local database 422 stores therein the first component to be synchronized.
The component repository 430 is configured to store a plurality of components uploaded by the terminal 420 and component configuration files of each component, and share the stored plurality of components with the terminal.
After the user inputs the upload instruction for the first component name through the interactive interface 421, the scaffold tool 410 obtains the upload instruction, searches the first component corresponding to the first component name in the component repository 430 according to the upload instruction, and if the first component is not found in the component repository 430, the scaffold tool 410 sends out the prompt message. After the user completes the component specification information corresponding to the hint information, the scaffold tool 410 generates a first component profile for the first component, the component profile including the first component name, and uploads the first component and the first component profile from the local database 420 to the component repository 430 to synchronize the first component to the component repository 430. Users can directly realize the distribution and sharing of the front end components through the scaffold tool, thereby improving the convenience and the working efficiency of operation and reducing the technical threshold and the repeated work.
In one embodiment, as shown in fig. 4, the system further comprises: an interface 440 is shown for the usage description file, effects map, and usage case description file for each component in the component repository.
In one particular embodiment, as shown in FIG. 6, a system for transporting components of one embodiment of the present application is provided, including a scaffold tool, a local project, a component code management warehouse, and a presentation system. The scaffold tool can acquire a viewing instruction, a downloading instruction, an uploading instruction and an updating instruction which are input by a user, and the functions corresponding to the instructions are respectively realized. The front end component A, B, C, D stored by the component code management warehouse may cause the scaffold tool to distribute the front end component from the component code management warehouse into the local project by downloading instructions. After the front-end components A and B contained in the local project are optimized, the scaffold tool can introduce the front-end components into the component code management warehouse from the local project through uploading instructions, so that a bidirectional sharing mechanism is realized. Based on the update instruction, the scaffold tool can update and cover the front-end component with the modification record in the local project, or update and cover the front-end component through the optimized content of the component code management warehouse, so as to realize a bidirectional update mechanism. And, when the developer needs to use the front-end components in the local database or component warehouse, the display instruction can be input through the scaffold tool. Aiming at the front-end component required to be displayed by a user in the display instruction, the scaffold tool can find out the component description information of the corresponding front-end component according to the display instruction and display the component description information in the interface of the display system. The component description information includes, but is not limited to, a usage description file (READM. Md), an effect map (snapshot. Png), a usage case description file (USAGE. Md), and the like. Through the visual display interface, a developer can quickly master the front-end component and the corresponding access method and the use description thereof.
Fig. 6 schematically illustrates a block diagram of a scaffold tool according to an embodiment of the present application. As shown in fig. 6, an embodiment of the present application provides a controller, which may include:
a memory 610 configured to store instructions; and
the processor 620 is configured to call instructions from the memory 610 and when executing the instructions can implement the method for controlling the boom described above.
Specifically, in embodiments of the present application, the processor 620 may be configured to:
acquiring an uploading instruction aiming at a first component name;
searching a first component corresponding to the first component name in a component warehouse according to the uploading instruction;
under the condition that the first component is not found in the component warehouse, sending out prompt information;
after the user perfects the component description information corresponding to the prompt information, generating a first component configuration file of the first component, wherein the component configuration file comprises a first component name;
the first component and the first component profile are uploaded to the component repository to synchronize the first component to the component repository.
Further, the processor 620 may be further configured to:
after the first component is synchronized to the component warehouse, acquiring a downloading instruction aiming at the name of the first component; searching a second component and a second component configuration file corresponding to the first component name in the component warehouse according to the downloading instruction, wherein the second component configuration file comprises the second component name of the dependent component corresponding to the first component; searching a component warehouse for a dependent component with a component name being a second component name; in the event that a dependent component is found, the dependent component and the second component are downloaded to a local database.
Further, the processor 620 may be further configured to:
after the first component is synchronized to the component warehouse, acquiring an update instruction aiming at the name of the first component; searching a third component corresponding to the first component name in the local database according to the updating instruction; determining whether a modification record exists in the third component in the local database; in the case that the third component has a modification record, updating the second component content of the third component in the local database according to the first component content included in the modification record; determining whether to update the third component according to the modification record in the case that the modification record does not exist in the third component; and under the condition that the third component is determined to be updated according to the modification record, updating the second component content of the third component in the local database by the third component content corresponding to the first component name in the component warehouse.
Further, the processor 620 may be further configured to:
determining whether a modification record exists for the third component in the local database includes: acquiring a first hash value corresponding to a second component, which is included in a second component configuration file; determining a second hash value corresponding to the third component; determining that the third component has a modification record under the condition that the first hash value is different from the second hash value; in the case that the first hash value is the same as the second hash value, it is determined that the third component does not have a modified record.
Further, the processor 620 may be further configured to:
the third component includes a plurality of files, each file including sub-component content, and determining a second hash value corresponding to the third component includes: determining a file directory structure corresponding to the third component; determining a third hash value for each subcomponent content; traversing all third hash values according to the file directory structure to generate second hash values corresponding to the third components.
Further, the processor 620 may be further configured to:
after the first component is synchronized to the component warehouse, acquiring a viewing instruction aiming at the component warehouse; and reading all the components of the component warehouse according to the viewing instruction, and generating a component list, wherein the component list comprises the component names of all the components of the component warehouse.
Further, the processor 620 may be further configured to:
the component description information includes a usage description file, an effect graph, and a use case description file of the first component, and the method further includes: after the first component is synchronized to the component warehouse, acquiring a display instruction input by a user, wherein the display instruction refers to a command for displaying component description information; and searching the use instruction file, the effect diagram and the use case instruction file according to the display instruction, and displaying the use instruction file, the effect diagram and the use case instruction file on a display interface.
Embodiments of the present application also provide a machine-readable storage medium having stored thereon instructions for causing a machine to perform the above-described method for transmitting a component.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor a01, a network interface a02, a memory (not shown) and a database (not shown) connected by a system bus. Wherein the processor a01 of the computer device is adapted to provide computing and control capabilities. The memory of the computer device includes internal memory a03 and nonvolatile storage medium a04. The nonvolatile storage medium a04 stores an operating system B01, a computer program B02, and a database (not shown in the figure). The internal memory a03 provides an environment for the operation of the operating system B01 and the computer program B02 in the nonvolatile storage medium a04. The database of the computer device is used to store data for the method of transferring the component. The network interface a02 of the computer device is used for communication with an external terminal through a network connection. The computer program B02, when executed by the processor a01, implements a method for transmitting components.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A method for transporting a component, for application to a scaffold tool, the method comprising:
acquiring an uploading instruction aiming at a first component name;
searching a first component corresponding to the first component name in a component warehouse according to the uploading instruction;
sending out prompt information under the condition that the first component is not found in the component warehouse;
after the user perfects the component description information corresponding to the prompt information, generating a first component configuration file of the first component, wherein the first component configuration file comprises the first component name;
the first component and the first component configuration file are uploaded from a local database to the component repository to synchronize the first component to the component repository.
2. The method for transmitting a component of claim 1, further comprising:
after the first component is synchronized to the component warehouse, acquiring a downloading instruction aiming at the name of the first component;
searching a second component and a second component configuration file corresponding to the first component name in the component warehouse according to the downloading instruction, wherein the second component configuration file comprises the second component name of the dependent component corresponding to the first component;
searching a component warehouse for a dependent component with a component name being the second component name;
and downloading the dependent component and the second component to the local database under the condition that the dependent component is found.
3. The method for transmitting a component of claim 1, further comprising:
after the first component is synchronized to the component warehouse, acquiring an update instruction for the first component name;
searching a third component corresponding to the first component name in the local database according to the updating instruction;
determining whether a modification record exists for the third component in the local database;
determining, in the presence of a modification record for the third component, whether to update the third component in accordance with the modification record;
in the case that the third component is determined to be updated according to the modification record, updating the second component content of the third component in the local database according to the first component content included in the modification record;
and under the condition that the third component does not have a modification record, updating the second component content of the third component in the local database by the third component content corresponding to the first component name in the component warehouse.
4. A method for transmitting a component as recited in claim 3, wherein determining whether a modification record exists for the third component in the local database comprises:
acquiring a first hash value corresponding to the second component, which is included in the second component configuration file;
determining a second hash value corresponding to the third component;
determining that the third component has a modification record if the first hash value is not the same as the second hash value;
and determining that the third component has no modified record under the condition that the first hash value is the same as the second hash value.
5. The method for transmitting components of claim 4, wherein the third component comprises a plurality of files, each file comprising sub-component content, and wherein determining the second hash value corresponding to the third component comprises:
determining a file directory structure corresponding to the third component;
determining a third hash value for each subcomponent content;
traversing all third hash values according to the file directory structure to generate second hash values corresponding to the third components.
6. The method for transmitting a component of claim 1, further comprising:
after the first component is synchronized to the component warehouse, acquiring a viewing instruction for the component warehouse;
and reading all the components of the component warehouse according to the viewing instruction, and generating a component list, wherein the component list comprises component names of all the components of the component warehouse.
7. The method for transmitting components of claim 1, wherein the component description information includes a usage description file, an effect graph, and a usage case description file for the first component, the method further comprising:
after the first component is synchronized to the component warehouse, acquiring a display instruction input by a user, wherein the display instruction refers to a command for displaying the component description information;
and searching the use instruction file, the effect diagram and the use case instruction file according to the display instruction, and displaying the use instruction file, the effect diagram and the use case instruction file on a display interface.
8. A system for a transport assembly, comprising:
scaffold tool comprising a processor configured to invoke the instructions from a memory and when executing the instructions is capable of implementing the method for transferring components according to any of claims 1 to 7;
the terminal comprises an interactive interface and a local database, wherein the interactive interface is used for acquiring an uploading instruction input by a user; the local database stores a first component to be synchronized;
and the component warehouse is used for storing the components uploaded by the terminal and the component configuration files of each component and sharing the stored components with the terminal.
9. The system for a transmission assembly of claim 8, further comprising:
and displaying an interface for the use description file, the effect graph and the use case description file of each component in the component warehouse.
10. A machine-readable storage medium having stored thereon instructions for causing a machine to perform the method for transmitting a component according to any one of claims 1 to 7.
CN202311276905.7A 2023-09-28 2023-09-28 Method, system and storage medium for transmitting components Pending CN117492812A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311276905.7A CN117492812A (en) 2023-09-28 2023-09-28 Method, system and storage medium for transmitting components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311276905.7A CN117492812A (en) 2023-09-28 2023-09-28 Method, system and storage medium for transmitting components

Publications (1)

Publication Number Publication Date
CN117492812A true CN117492812A (en) 2024-02-02

Family

ID=89667960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311276905.7A Pending CN117492812A (en) 2023-09-28 2023-09-28 Method, system and storage medium for transmitting components

Country Status (1)

Country Link
CN (1) CN117492812A (en)

Similar Documents

Publication Publication Date Title
US9344833B2 (en) Data component in a mobile application framework
US8893077B1 (en) Service to generate API libraries from a description
US8370826B2 (en) Automatically managing versioning of mashup widgets
US6748591B1 (en) Method, system, program, and data structures for loading programs into a runtime environment
CN108563440B (en) Automatic adding method and device of list controller codes and readable storage medium
CN112947992B (en) Code version management method and device
CN113778445A (en) Cross-platform component generation method and device, electronic equipment and storage medium
US20190095261A1 (en) Software resource management
CN117707543A (en) Application installation package manufacturing and installation method, computing device and storage medium
CN115857898B (en) Application system construction and operation method and device
CN117492812A (en) Method, system and storage medium for transmitting components
US20180181382A1 (en) Consuming persistent library bundles
US9936015B2 (en) Method for building up a content management system
CN112114871A (en) Code sharing method, device, server, terminal and medium
CN112947956A (en) Application software upgrading method
WO2015095589A1 (en) An inheritance base right object file generation and management scheme in a home server
CN115981614B (en) Modular processing method for project engineering, electronic equipment and computer storage medium
CN113626007B (en) Application method and device of connector model and server
CN117076473B (en) Metadata operation method, system, equipment and medium for SaaS multi-tenant
CN116071524A (en) Method, device, storage medium and processor for issuing design drawing
US20130218855A1 (en) Method and system for managing data and a corresponding computer program and a corresponding computer-readable storage medium
Martin Creating an Operator with Kubebuilder
Martin Writing Operators withthe Controller-Runtime Library
CN118132167A (en) Progressive component sharing management method and device
CN115328537A (en) Version management method of configuration management system and configuration version management system

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