CN110489106A - A kind of generation method, device, medium and the electronic equipment of project initial code - Google Patents
A kind of generation method, device, medium and the electronic equipment of project initial code Download PDFInfo
- Publication number
- CN110489106A CN110489106A CN201910662118.3A CN201910662118A CN110489106A CN 110489106 A CN110489106 A CN 110489106A CN 201910662118 A CN201910662118 A CN 201910662118A CN 110489106 A CN110489106 A CN 110489106A
- Authority
- CN
- China
- Prior art keywords
- project
- filled
- templet
- information
- project templet
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/35—Creation or generation of source code model driven
Abstract
The present invention provides generation method, device, medium and the electronic equipment of a kind of project initial code, which includes: to search for from the list of corresponding user warehouse according to the name of specified project templet and determine corresponding template item;According to every configuration parameter in the configuration file of preset format in project templet, inquires and obtain the information to be filled of project templet;According to the information to be filled of project templet, the project undetermined of project templet is filled, filled project templet is obtained;Using filled project templet as code building template, corresponding project initial code is generated.The disclosure, as code building template, is started the command program and automatically generates project initial code by filled project templet, therefore, is avoided the troublesome operation that existing project initial code generates, is simplified the generating process of project initial code.
Description
Technical field
The present invention relates to field of computer technology, generation method, dress in particular to a kind of project initial code
It sets, medium and electronic equipment.
Background technique
Existing technology requires grassroot project in the incipient stage of exploitation.For newly-built project, can be related to very
The replication work of multifile, chooses associated content from original project, and by the associated content in existing project
In the new project copied to, in this way, the process of grassroot project will be extremely cumbersome process.
For above situation, there are some solutions at present, described in detail below:
The first solution: project is generated using similar this tool of create-react-app or vue-cli
Initial code, but it is obvious that can be only generated the item code using corresponding technological frame the shortcomings that this method, it is this
The applicable project of method is very limited.
Second of solution: some template projects are created, and the storage of the template item of creation is got up, are waited to be used
When, they are replicated and is pasted, replaces the partial document of the inside then to initialize project.The shortcomings that second of solution
It is: it is complex for operation step, and in cumbersome operating procedure, easy leakage changes some contents, and the content changed to leakage is answered
The process looked into is also extremely cumbersome process.
The third solution: generating project initial code using this Auto-Generation Tool of yo, and this method lacks
Point is: it should be understood that the normalized written of yo document, and need developer to learn correlation specially during creating project templet
Industry knowledge, cost of implementation are higher.
Above-mentioned only to enumerate some common solutions, solution is not limited only to the above method, still
The generation method of current project initial code is excessively complicated, and operating process is cumbersome, needs professional person to complete.
Therefore, in long-term research and development, inventor carries out the generation method for how simplifying project initial code
One of a large amount of research, proposes a kind of generation method of project initial code, to solve the above technical problems.
Summary of the invention
The purpose of the present invention is to provide generation method, device, medium and the electronic equipment of a kind of project initial code,
It is able to solve at least one technical problem mentioned above.Concrete scheme is as follows:
Specific embodiment according to the present invention, in a first aspect, the disclosure provides a kind of generation of project initial code
Method, comprising:
According to the name of specified project templet, is searched for from the list of corresponding user warehouse and determine corresponding template item
Mesh;
According to every configuration parameter in the project templet in the configuration file of preset format, inquires and obtain the item
The information to be filled of mesh template;
According to the information to be filled of the project templet, the project undetermined of the project templet is filled, is obtained filled
Project templet;
Using the filled project templet as code building template, corresponding project initial code is generated.
Optionally, it is inquired in the configuration file according to preset format in the project templet and obtains the project mould
Before the information to be filled of plate, the method also includes:
Obtain the configuration file of preset format in the project templet, wherein configuration file in the project templet
Preset format is json format.
Optionally, every configuration parameter according in the project templet in the configuration file of preset format, inquiry
And the information to be filled for obtaining the project templet includes:
If the preset format of the configuration file is json format, the configuration file of json format is read, described in acquisition
Every configuration parameter in the configuration file of json format, and inquire by every configuration parameter and obtain the project templet
Information to be filled;
Wherein, every configuration parameter includes at least: for every offering question of the information setting to be filled, for each
The corresponding multinomial optional answer of offering question of each of item offering question;
The information to be filled includes at least: the field name information of every offering question is directed to every offering question use
The field name information of answer to be filled determined by family.
Optionally, the method also includes:
The first order is read, and according to the name of the specified initialization item destination name and technical routine template of the first order
Word.
Optionally, the method also includes:
The second order is read, and account user name and configuration institute according to the second order configuration based on GitHub platform
State the suffix information of specified project templet.
Optionally, described according to account user name and configuration of the second order configuration based on GitHub platform
After the suffix information of specified project templet, the method also includes:
The suffix information is obtained, and determines the name of the specified project templet according to the suffix information.
Optionally, it is described obtain filled project templet after, the method also includes:
Project folder is created, the filled project templet is saved into the project folder.
Specific embodiment according to the present invention, second aspect, the present invention provide a kind of generation of project initial code
Device, comprising:
Determination unit is searched for, for the name according to specified project templet, is searched for from the list of corresponding user warehouse
And determine corresponding template item;
Processing unit, for the configuration text according to preset format in the determining project templet of described search determination unit
Every configuration parameter in part inquires and obtains the information to be filled of the project templet;
Fills unit, the information to be filled of the project templet for being obtained according to the processing unit processes, filling
The project undetermined of the project templet, obtains filled project templet;
Code generating unit, the filled project templet for filling the fills unit is as code
Template is generated, corresponding project initial code is generated.
Specific embodiment according to the present invention, the third aspect, the present invention provide a kind of computer readable storage medium,
On be stored with computer program, realized when described program is executed by processor content as above in described in any item pairs of documents into
The method of edlin.
Specific embodiment according to the present invention, fourth aspect, the present invention provide a kind of electronic equipment, comprising: one or
Multiple processors;Storage device, for storing one or more programs, when one or more of programs are by one or more
When a processor executes, so that one or more of processors realize that the content in as above described in any item pairs of documents carries out
The method of editor.
The above scheme of the embodiment of the present invention compared with prior art, at least has the advantages that the disclosure provides
A kind of generation method, device, medium and the electronic equipment of project initial code, by filled project templet as code
Template is generated, starts the command program and automatically generates project initial code, therefore, avoid existing project initial code
The troublesome operation of generation simplifies the generating process of project initial code.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 shows the generation method flow chart of project initial code according to an embodiment of the present invention;
Fig. 2 shows the generating means structural schematic diagrams of the project initial code of embodiment according to the present invention;
Fig. 3 shows the electronic equipment attachment structure schematic diagram of embodiment according to the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into
It is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
All other embodiment, shall fall within the protection scope of the present invention.
The term used in embodiments of the present invention is only to be not intended to be limiting merely for for the purpose of describing particular embodiments
The present invention.In the embodiment of the present invention and the "an" of singular used in the attached claims, " described " and "the"
It is also intended to including most forms, unless the context clearly indicates other meaning, " a variety of " generally comprise at least two.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, indicate
There may be three kinds of relationships, for example, A and/or B, can indicate: individualism A, exist simultaneously A and B, individualism B these three
Situation.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
It will be appreciated that though may be described in embodiments of the present invention using term first, second, third, etc..,
But these ... it should not necessarily be limited by these terms.These terms be only used to by ... distinguish.For example, not departing from implementation of the present invention
In the case where example range, first ... can also be referred to as second ..., and similarly, second ... can also be referred to as the
One ....
Depending on context, word as used in this " if ", " if " can be construed to " ... when " or
" when ... " or " in response to determination " or " in response to detection ".Similarly, context is depended on, phrase " if it is determined that " or " such as
Fruit detection (condition or event of statement) " can be construed to " when determining " or " in response to determination " or " when detection (statement
Condition or event) when " or " in response to detection (condition or event of statement) ".
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Include, so that commodity or device including a series of elements not only include those elements, but also including not clear
The other element listed, or further include for this commodity or the intrinsic element of device.In the feelings not limited more
Under condition, the element that is limited by sentence "including a ...", it is not excluded that in the commodity or device for including the element also
There are other identical elements.
The alternative embodiment that the invention will now be described in detail with reference to the accompanying drawings.
Embodiment 1
As shown in Figure 1, according to the specific embodiment of the disclosure, in a first aspect, the disclosure provides a kind of project initialization
The generation method of code, comprising:
S102: it according to the name of specified project templet, searches for and determines corresponding from the list of corresponding user warehouse
Template item.
In step, realized by init order;
Init order application method are as follows: init [projectName]-t [templateName].
The name of initialization item destination name and technical routine template is specified using init order, runs init order
Afterwards;It can be gone to find template project in corresponding user GitHub warehouse list according to specified template name, under then downloading
Come.
In specific example, use GitHub platform as the storage place of project templet, in such manner, it is possible to facilitate subsequent fine
It is quasi- and rapidly find relevant project templet, search efficiency is not only increased, user experience is also improved.
GitHub is the hosted platform towards open source and privately owned software project, because only supporting Git as unique
Version library format carries out trustship, therefore named GitHub.
S104: it according to every configuration parameter in the configuration file of preset format in project templet, inquires and obtains project
The information to be filled of template.
In step, realized by init order.
Init order application method are as follows: init [projectName]-t [templateName].
Initialization item destination name and the name using template are specified using init order, after running init order;In
After having executed S102, according to the json file of the configuration in template project, to inquire some information of user;It obtains and collects item
The information to be filled of mesh template.
It should be noted that every configuration parameter includes at least: every offering question, needle for information to be filled setting
Multinomial optional answer corresponding to each of every offering question offering question;
Information to be filled includes at least: the field name information of every offering question is directed to every offering question user institute
The field name information of determining answer to be filled.
In this step, it is exactly based on every offering question for information to be filled setting, for every offering question
Each of the corresponding multinomial optional answer of offering question;Obtain the information to be filled for being directed to each disparity items.
In practical applications, just because of each different project is directed to, different information to be filled can be set,
The project templet for meeting different clients demand is arranged, and corresponding project is generated according to personalized project templet and initializes generation
Code.
S106: according to the information to be filled of project templet, the project undetermined of project templet is filled, filled project is obtained
Template.
In this step, it is realized by init order.
Init order application method are as follows: init [projectName]-t [templateName].
Initialization item destination name and the name using template are specified using init order, after running init order;Root
It goes to find template project in corresponding user GitHub warehouse list according to specified template name, then download;It is executing
After complete S104, according to the information to be filled of project templet, the project undetermined of project templet is filled, obtains filled project mould
Plate.
Information to be filled includes at least: the field name information of every offering question is directed to every offering question user institute
The field name information of determining answer to be filled.
In this step, it is exactly based on every offering question for information to be filled setting, for every offering question
Each of the corresponding multinomial optional answer of offering question;The information to be filled for being directed to each disparity items is obtained, and
Information to be filled is personalized, to meet the demand of different user creation disparity items template.
In different concrete application scenes, the field name information of every offering question in information to be filled is different,
And it is directed to the field name information of answer to be filled determined by every offering question user and is also different;In this way, passing through
By information to be filled materialization and personalization, to meet the demand of different user creation disparity items template;In this way, being directed to
The demand of the creation project templet of different user can generate the project initialization generation for meeting user demand automatically and intelligently
Code.
S108: using filled project templet as code building template, corresponding project initial code is generated.
In this step, it is generated using filled project templet as code building template according to the code building template
Corresponding project initial code, in this way, not only simplifying the generating process of project initial code, and filled project
Template is the project templet for meeting users ' individualized requirement, improves user experience.
In addition, the disclosure provides a kind of generation method of project initial code, it can not only effectively manage user's
Template project, and the work that a large amount of cumbersome duplications are pasted is eliminated, while can increase by configuration file to project template
Add the function of dynamic replacement, further enriches the various functions of project templet.
Optionally, it is being inquired according to the configuration file of preset format in project templet and is obtaining the letter to be filled of project templet
Before breath, the method also includes:
Obtain the configuration file of preset format in project templet, wherein the preset format of the configuration file in project templet
For json format.
Optionally, it according to every configuration parameter in the configuration file of preset format in project templet, inquires and obtains item
The information to be filled of mesh template includes:
If the preset format of configuration file is json format, the configuration file of json format is read, obtains json format
Configuration file in every configuration parameter, and inquire by every configuration parameter and obtain the information to be filled of project templet;
Wherein, every configuration parameter includes at least: setting for every offering question of information to be filled setting, for items
Set the corresponding multinomial optional answer of each of problem offering question;
Information to be filled includes at least: the field name information of every offering question is directed to every offering question user institute
The field name information of determining answer to be filled.
In specific example, if the preset format of the configuration file in project templet is json format, original is being got
After the project templet of beginning, preset every configuration parameter in configuration file is read, and inquire and obtain by every configuration parameter
Come to every customized information of user, and using obtained every customized information as the information to be filled in project templet
Source, and original project templet is further improved, until each single item project to be filled in original project templet is filled with
After meeting user personalized information, project templet after perfect filling is obtained, and project templet is to meet use after the filling
The project templet of family demand.
Optionally, the method also includes:
The first order is read, and according to the name of the specified initialization item destination name and technical routine template of the first order.
In specific example, the first order is init order, order is realized by init order, and refer to according to the first order
The name of fixed initialization item destination name and technical routine template.
Init order application method are as follows: init [projectName]-t [templateName].
The name of initialization item destination name and technical routine template is specified using init order.
Optionally, the method also includes:
It reads second to order, and configures what the account user name based on GitHub platform was specified with configuration according to the second order
The suffix information of project templet.
In specific example, the second order is config order, realizes configuration based on GitHub by config order
The suffix information for the project templet that the account user name of platform and configuration are specified.
In practical applications, realizing configuration based on the account user name of GitHub platform and configuration by config order
After the suffix information of specified project templet, program can be automatically saved to be referred to based on the account user name of GitHub platform and configuration
The suffix information of fixed project templet, in this way, the account user of the meeting Automatic-searching preservation is under one's name when finding project templet
Warehouse list, realize intelligentized search.
In practical applications, there is corresponding suffix just because of project templet, by reading each project templet
Specific suffix mark, can precisely and efficiently find maximally related project templet.
Optionally, in the project mould specified with configuration according to the second account user name of the order configuration based on GitHub platform
After the suffix information of plate, the method also includes:
Suffix information is obtained, and determines the name of specified project templet according to suffix information.
Optionally, after obtaining filled project templet, the method also includes: creation project folder will be filled out
Project templet after filling is saved into project folder.
The disclosure is by providing generation method, device, medium and the electronic equipment of a kind of project initial code, by filling out
Project templet after filling starts the command program and automatically generates project initial code, therefore, avoid as code building template
The troublesome operation that existing project initial code generates, simplifies the generating process of project initial code.
Embodiment 2
As shown in Fig. 2, second aspect, the disclosure provides a kind of project initialization according to the specific embodiment of the disclosure
The generating means of code, described device include search determination unit 202, processing unit 204, fills unit 206 and code building
Unit 208 etc., specific as follows:
Determination unit 202 is searched for, for the name according to specified project templet, is searched from the list of corresponding user warehouse
Rope simultaneously determines corresponding template item;
Processing unit 204, for the configuration file according to preset format in the determining project templet of search determination unit 202
In every configuration parameter, inquire and obtain the information to be filled of project templet;
Fills unit 206, for handling the information to be filled of obtained project templet, filler according to processing unit 204
The project undetermined of mesh template, obtains filled project templet;
Code generating unit 208, it is raw as code for fills unit 206 to be filled obtained filled project templet
At template, corresponding project initial code is generated.
Optionally, described device further include:
Acquiring unit 210, for inquiring and obtaining according to the configuration file of preset format in project templet in processing unit 204
To before the information to be filled of project templet, the configuration file of preset format in project templet is obtained, wherein in project templet
The preset format of configuration file is json format.
Optionally, acquiring unit 210 is also used to:
If the preset format of configuration file is json format, every configuration ginseng in the configuration file of json format is obtained
Number.
Optionally, processing unit 204 is used for:
If the preset format of configuration file is json format, the configuration file of json format is read, obtains acquiring unit
Every configuration parameter in the configuration file of the 210 json formats got, and inquire by every configuration parameter and obtain item
The information to be filled of mesh template.
Optionally, acquiring unit 210 is also used to:
Obtain every configuration parameter;
Wherein, every configuration parameter that acquiring unit 210 is got includes at least: for the items of information to be filled setting
Offering question is directed to the corresponding multinomial optional answer of offering question of each of every offering question.
Optionally, acquiring unit 210 is also used to:
Obtain information to be filled;
Wherein, the information to be filled that acquiring unit 210 is got includes at least: the field name information of every offering question,
It is directed to the field name information of answer to be filled determined by every offering question user.
Optionally, described device further include:
First reading order unit 212, for reading the first order;
Designating unit 214, first for being read according to the first reading order unit 212 orders specified initialization project
Name and technical routine template name.
Optionally, described device further include:
Second reading order unit 216, for reading the second order;
Configuration unit 218, the second order configuration for being read according to the second reading order unit 216 is based on GitHub
The suffix information for the project templet that the account user name of platform and configuration are specified.
Described device further include:
Acquiring unit 210 is also used to:
The item that account user name and configuration in configuration unit 218 according to the second order configuration based on GitHub platform are specified
After the suffix information of mesh template, suffix information is obtained;
Described device further include:
Determination unit 220, the suffix information for being got according to acquiring unit 210 determine specified project templet
Name.
Described device further include:
Storage unit 222 is created, for after fills unit 206 obtains filled project templet, creation project to be literary
Part folder, and the filled project templet that fills unit 206 is obtained is saved into project folder.
The disclosure is by providing generation method, device, medium and the electronic equipment of a kind of project initial code, by filling out
Project templet after filling starts the command program and automatically generates project initial code, therefore, avoid as code building template
The troublesome operation that existing project initial code generates, simplifies the generating process of project initial code.
Embodiment 3
As shown in figure 3, the equipment is used for the side that project initial code generates the present embodiment provides a kind of electronic equipment
Method, the electronic equipment, comprising: at least one processor;And the storage being connect at least one described processor communication
Device;Wherein,
The memory is stored with the instruction that can be executed by one processor, and described instruction is by described at least one
Manage device execute so that at least one described processor can: by filled project templet be used as code building template, start
The command program automatically generates project initial code, therefore, avoids the cumbersome behaviour that existing project initial code generates
Make, simplifies the generating process of project initial code.
Embodiment 4
The embodiment of the present disclosure provides a kind of nonvolatile computer storage media, and the computer storage medium is stored with
The project initial code in above-mentioned any means embodiment can be performed in computer executable instructions, the computer executable instructions
Generation method.
Embodiment 5
Below with reference to Fig. 3, it illustrates the structural representations for the electronic equipment 300 for being suitable for being used to realize the embodiment of the present disclosure
Figure.Terminal device in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, digital broadcasting and connect
Receive device, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle
Carry navigation terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.Electricity shown in Fig. 3
Sub- equipment is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 3, electronic equipment 300 may include processing unit (such as central processing unit, graphics processor etc.)
301, random access can be loaded into according to the program being stored in read-only memory (ROM) 302 or from storage device 308
Program in memory (RAM) 303 and execute various movements appropriate and processing.In RAM 303, it is also stored with electronic equipment
Various programs and data needed for 300 operations.Processing unit 301, ROM 302 and RAM 303 pass through the phase each other of bus 304
Even.Input/output (I/O) interface 305 is also connected to bus 304.
In general, following device can connect to I/O interface 305: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph
As the input unit 306 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration
The output device 307 of dynamic device etc.;Storage device 308 including such as tape, hard disk etc.;And communication device 309.Communication device
309, which can permit electronic equipment 300, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 3 shows tool
There is the electronic equipment 300 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with
Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communication device 309, or from storage device 308
It is mounted, or is mounted from ROM 302.When the computer program is executed by processing unit 301, the embodiment of the present disclosure is executed
Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated,
In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to
Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit
Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned
Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity
When sub- equipment executes, so that the electronic equipment: by filled project templet as code building template, starting the order journey
Sequence automatically generates project initial code, therefore, avoids the troublesome operation that existing project initial code generates, simplifies
The generating process of project initial code.
Alternatively, above-mentioned computer-readable medium carries one or more program, when said one or multiple programs
When being executed by the electronic equipment, so that the electronic equipment: by filled project templet as code building template, starting should
Command program automatically generates project initial code, therefore, avoids the troublesome operation that existing project initial code generates,
Simplify the generating process of project initial code.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof
Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+
+, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can
Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package,
Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part.
In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN)
Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service
Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the
One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
Claims (10)
1. a kind of generation method of project initial code characterized by comprising
According to the name of specified project templet, is searched for from the list of corresponding user warehouse and determine corresponding template item;
According to every configuration parameter in the project templet in the configuration file of preset format, inquires and obtain the project mould
The information to be filled of plate;
According to the information to be filled of the project templet, the project undetermined of the project templet is filled, filled project is obtained
Template;
Using the filled project templet as code building template, corresponding project initial code is generated.
2. the method according to claim 1, wherein being matched described according to preset format in the project templet
Before setting file inquiry and obtaining the information to be filled of the project templet, the method also includes:
Obtain the configuration file of preset format in the project templet, wherein configuration file in the project templet it is default
Format is json format.
3. according to the method described in claim 2, it is characterized in that, the configuration according to preset format in the project templet
Every configuration parameter in file, is inquired and the information to be filled for obtaining the project templet includes:
If the preset format of the configuration file is json format, the configuration file of json format is read, the json is obtained
Every configuration parameter in the configuration file of format, and inquired by every configuration parameter and obtain the project templet wait fill out
Fill information;
Wherein, every configuration parameter includes at least: setting for every offering question of the information setting to be filled, for items
Set the corresponding multinomial optional answer of each of problem offering question;
The information to be filled includes at least: the field name information of every offering question is directed to every offering question user institute
The field name information of determining answer to be filled.
4. the method according to claim 1, wherein the method also includes:
The first order is read, and according to the name of the specified initialization item destination name and technical routine template of the first order.
5. the method according to claim 1, wherein the method also includes:
The second order is read, and the account user name based on GitHub platform is configured according to second order and configures the finger
The suffix information of fixed project templet.
6. according to the method described in claim 5, it is characterized in that, being based on GitHub according to the second order configuration described
After the account user name of platform and the suffix information of the configuration specified project templet, the method also includes:
The suffix information is obtained, and determines the name of the specified project templet according to the suffix information.
7. the method according to claim 1, wherein it is described obtain filled project templet after, it is described
Method further include:
Project folder is created, the filled project templet is saved into the project folder.
8. a kind of generating means of project initial code characterized by comprising
Determination unit is searched for, for the name according to specified project templet, is searched for from the list of corresponding user warehouse and true
Fixed corresponding template item;
Processing unit, for according to described search determination unit determine the project templet in preset format configuration file in
Every configuration parameter, inquire and obtain the information to be filled of the project templet;
Fills unit, the information to be filled of the project templet for being obtained according to the processing unit processes, described in filling
The project undetermined of project templet, obtains filled project templet;
Code generating unit, the filled project templet for filling the fills unit is as code building
Template generates corresponding project initial code.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is by processor
The method as described in any one of claims 1 to 7 is realized when execution.
10. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing
When device executes, so that one or more of processors realize the method as described in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910662118.3A CN110489106A (en) | 2019-07-22 | 2019-07-22 | A kind of generation method, device, medium and the electronic equipment of project initial code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910662118.3A CN110489106A (en) | 2019-07-22 | 2019-07-22 | A kind of generation method, device, medium and the electronic equipment of project initial code |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110489106A true CN110489106A (en) | 2019-11-22 |
Family
ID=68547865
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910662118.3A Pending CN110489106A (en) | 2019-07-22 | 2019-07-22 | A kind of generation method, device, medium and the electronic equipment of project initial code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110489106A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111459469A (en) * | 2020-04-03 | 2020-07-28 | 网易(杭州)网络有限公司 | Project code initialization method, device and equipment |
CN112015375A (en) * | 2020-08-21 | 2020-12-01 | 广州欢网科技有限责任公司 | Background management system creating method and device and electronic equipment |
CN113608726A (en) * | 2021-07-30 | 2021-11-05 | 三一专用汽车有限责任公司 | Code generation method and device, electronic equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105487864A (en) * | 2015-11-26 | 2016-04-13 | 北京京东尚科信息技术有限公司 | Method and device for automatically generating code |
CN106293664A (en) * | 2015-05-27 | 2017-01-04 | 交通银行股份有限公司 | Code generating method and device |
CN108009230A (en) * | 2017-11-29 | 2018-05-08 | 中煤航测遥感集团有限公司 | Data processing method and device |
CN108647010A (en) * | 2018-04-27 | 2018-10-12 | 武汉斗鱼网络科技有限公司 | A kind of method, terminal device and the storage medium of projects initialization |
CN109240654A (en) * | 2018-07-24 | 2019-01-18 | 武汉空心科技有限公司 | Development approach and system based on template |
CN109254992A (en) * | 2018-10-12 | 2019-01-22 | 北京京东金融科技控股有限公司 | Project generation method and system, computer system and computer readable storage medium storing program for executing |
CN109725893A (en) * | 2018-05-17 | 2019-05-07 | 平安普惠企业管理有限公司 | Code generating method, unit and computer readable storage medium |
CN109857667A (en) * | 2019-02-03 | 2019-06-07 | 苏州市龙测智能科技有限公司 | Automatic interface testing method, test device, test equipment and storage medium |
CN110032369A (en) * | 2019-04-24 | 2019-07-19 | 成都市映潮科技股份有限公司 | A kind of code automatic generation method, device and medium |
-
2019
- 2019-07-22 CN CN201910662118.3A patent/CN110489106A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106293664A (en) * | 2015-05-27 | 2017-01-04 | 交通银行股份有限公司 | Code generating method and device |
CN105487864A (en) * | 2015-11-26 | 2016-04-13 | 北京京东尚科信息技术有限公司 | Method and device for automatically generating code |
CN108009230A (en) * | 2017-11-29 | 2018-05-08 | 中煤航测遥感集团有限公司 | Data processing method and device |
CN108647010A (en) * | 2018-04-27 | 2018-10-12 | 武汉斗鱼网络科技有限公司 | A kind of method, terminal device and the storage medium of projects initialization |
CN109725893A (en) * | 2018-05-17 | 2019-05-07 | 平安普惠企业管理有限公司 | Code generating method, unit and computer readable storage medium |
CN109240654A (en) * | 2018-07-24 | 2019-01-18 | 武汉空心科技有限公司 | Development approach and system based on template |
CN109254992A (en) * | 2018-10-12 | 2019-01-22 | 北京京东金融科技控股有限公司 | Project generation method and system, computer system and computer readable storage medium storing program for executing |
CN109857667A (en) * | 2019-02-03 | 2019-06-07 | 苏州市龙测智能科技有限公司 | Automatic interface testing method, test device, test equipment and storage medium |
CN110032369A (en) * | 2019-04-24 | 2019-07-19 | 成都市映潮科技股份有限公司 | A kind of code automatic generation method, device and medium |
Non-Patent Citations (1)
Title |
---|
刘博等: "使用Visual Studio模板和策略来统一和维护项目的框架结构", 《科学技术与工程》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111459469A (en) * | 2020-04-03 | 2020-07-28 | 网易(杭州)网络有限公司 | Project code initialization method, device and equipment |
CN111459469B (en) * | 2020-04-03 | 2024-02-06 | 网易(杭州)网络有限公司 | Project code initialization method, device and equipment |
CN112015375A (en) * | 2020-08-21 | 2020-12-01 | 广州欢网科技有限责任公司 | Background management system creating method and device and electronic equipment |
CN113608726A (en) * | 2021-07-30 | 2021-11-05 | 三一专用汽车有限责任公司 | Code generation method and device, electronic equipment and storage medium |
CN113608726B (en) * | 2021-07-30 | 2023-08-11 | 三一专用汽车有限责任公司 | Code generation method, device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TW201447618A (en) | Automatic generation of a collection of content | |
CN110119294A (en) | The generation method of menu page, apparatus and system | |
CN110489106A (en) | A kind of generation method, device, medium and the electronic equipment of project initial code | |
CN113031946B (en) | Method and device for rendering page component | |
US20160259795A1 (en) | Distributed version control of orchestration templates | |
CN109036397A (en) | The method and apparatus of content for rendering | |
CN109976793A (en) | A kind of operation method of application program, device, equipment and medium | |
CN110489087A (en) | A kind of method, apparatus, medium and electronic equipment generating fractal structure | |
CN109359281A (en) | Dynamic list generation method and device | |
CN107463406A (en) | Issue the method and electronic equipment of Mobile solution | |
CN113407882A (en) | Component generation method and device, computer-readable storage medium and electronic equipment | |
CN109446199A (en) | Cell data processing method and device | |
CN114385164A (en) | Page generation and rendering method and device, electronic equipment and storage medium | |
US9792527B2 (en) | Automated slide comparator | |
US10956026B2 (en) | Smart element filtering method via gestures | |
CN110442416B (en) | Method, electronic device and computer-readable medium for presenting information | |
CN105739717B (en) | Data inputting method and device | |
CN110134477B (en) | Method, device, medium and electronic equipment for dynamically laying out user pages | |
CN110333859B (en) | Page creation method, page creation device, electronic device and computer readable storage medium | |
CN108984260B (en) | Method and apparatus for handling information | |
CN108959294A (en) | A kind of method and apparatus accessing search engine | |
CN110673908A (en) | Interface generation method, device, medium and electronic equipment | |
US9135725B2 (en) | Generic media covers | |
CN110058857A (en) | Generation method and device are applied in boarding | |
CN110618811A (en) | Information presentation method and device |
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 |