Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Method and system for automatically generating development document based on code annotation

An automatic generation and annotation technology, applied in file management systems, program files, program loading/starting, etc., can solve the problems of difficulty in combining local projects, lack of use documents, and few use documents, which is conducive to unified maintenance and reduces maintenance. cost, the effect of improving usability

Pending Publication Date: 2020-02-07
百卓网络科技有限公司
View PDF1 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] 1. Through the ordinary markdown document generation system, it can only meet the requirements of writing documents, and the usability is relatively low
[0007] 2. Redemo is a set of React component documentation system developed by Tencent's front-end team, but it is difficult to integrate with local projects, and there is a lack of documentation
[0008] 3. Bi Sheng is a set of document generator written by ant-design (Ali team). It uses relatively few documents and is difficult to understand. In addition, it is difficult to combine with local projects.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for automatically generating development document based on code annotation
  • Method and system for automatically generating development document based on code annotation
  • Method and system for automatically generating development document based on code annotation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The present invention will be further described below in conjunction with the accompanying drawings and exemplary embodiments:

[0031] Such as figure 1 The shown method for automatically generating development documents based on code comments includes the following steps:

[0032] Step 101: Install the document generator. The project is built through webpack, just install react-styleguidist, no other tedious installation and environment configuration are required.

[0033] Step 102: Configure related configuration files. Create and configure the styleguide.config.js file in the same level directory of the webpack configuration file. Some special configuration methods require specific configuration according to the component structure of the project. There are two main points:

[0034] (1) The configuration code for component acquisition is as follows:

[0035]

[0036] The above configuration is used to tell react-styleguidist which components in the project need to be obtaine...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and system for automatically generating a development document based on code annotation, and the method is characterized in that the method comprises the following steps: installing webpack and react-stylegidist for constructing a project; creating and configuring a styleguide.config.js file under a same-level directory of a webpack configuration file, classifyingcomponents of a project, putting the components which need to be exposed to the outside under a views directory, and obtaining .jsx file through a wildcard select\*; introducing a public style and a special style into a project through a package file, conducting global setting on an antd component library, and integrating redux data; configuring a script in a package.json; in webpack configuration, respectively adding and setting different interface addresses for different environments through env environment variables, and then normally accessing an interface through an agent. The effects ofautomatically generating code annotations of components, writing demo and corresponding instructions for various use scenes, attaching a demo source code, modifying the source code and previewing thedemo in real time are achieved.

Description

Technical field [0001] The invention relates to the field of service discovery of computer processing technology, in particular to a method and system for automatically generating development documents based on code comments. Background technique [0002] To develop a React project, we need to develop many React components, especially some public components. After developing a component, we will face the following problems: [0003] A colleague of the project team wants to use the component, but doesn’t know how to use it. He must go to the page where the component has been used before, or directly look at the component source code, which is troublesome and time-consuming, and may not be able to figure it out; a new joiner Colleagues in the project team want to familiarize themselves with the project and see where there are common components. If there are some demo examples at this time, it will be very intuitive; even the people who develop the components themselves will forget ea...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/73G06F9/445G06F16/93
CPCG06F8/73G06F9/44526G06F16/93
Inventor 郭兆东
Owner 百卓网络科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products