Skip to content

Commit 8a100f9

Browse files
committed
Updated docs
1 parent c3c7ce4 commit 8a100f9

14 files changed

+235
-186
lines changed

docs/Requirements.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/VSCode.md

Lines changed: 0 additions & 95 deletions
This file was deleted.

docs/about.md

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
1-
# Temperat agros cremet
1+
# About
22

3-
## Probarunt facta sua praeceps Sicanias puerum
4-
5-
Lorem markdownum nympha? Undas virus eripitur parentes mater
6-
[iuvenumque](http://telephonexpulsa.com/iovisque) tempus tamen arcana, neve
7-
summo meritumque igitur. *Noctes creamur* Chariclo me operosa capite.
8-
9-
> Viso ulla siqua inmunesque quoque, tollensque subruit unda tamen, perire:
10-
> tinnulaque sub cum! Deus remissos cape, *si resupinus* iussos
11-
> [vidit](http://www.coniunx.org/provida) Charybdis amico veteres territa:
12-
> gravis Cythereide abire formatum pugnet, pro.
13-
14-
## Instimulat tenues
15-
16-
Deriguit lacus [altissima](http://timent-viros.net/suosaperite), in undas
17-
fortuna! Pallade molli: [paulumque dei](http://www.tumulo.net/corpusque) est
18-
flabat odoribus Hippothousque, ille tua Haemonio patris poscentem deae versus.
19-
Viribus Heliadum hostem [vox](http://tendentemque.io/) tamen arma: versata
20-
**dicta sequentia qui**. Pello iuvenci secessit communes in **venit** disiecta
21-
iugo notam! Domestica solusque Dryantis ilia!
22-
23-
Tenebant rettulit intonat citraque iacta. Nec inclusos, moratum lactis animique
24-
discedunt autumnos. Dea huic esset, ipso caeli eruerit moenia e Minervam corpore
25-
ferreus tinnitibus furor mansit: opes novat? Rursus dedecus sontes, proelia
26-
erat, vel alta Meleagron Scirone. Montis in Aeneaden, tectis quas, tot facinus
27-
passurae captus, ima et!
28-
29-
## Habes parabat audit
30-
31-
Palmis in genitore tonarent, clam me Ceycis ex tota iam terra inquit; longeque.
32-
Perpetuum iuvenalis blandisque Haemus solidum, liquet dolor potentior torum
33-
quiescet adesset vincat, natura lurida, tenentem impetus plenumque. Simplex quid
34-
exponit nam hospita matre! Caeli praecipue dedit is effugimus tamen et relaxant
35-
semina; et tenebat colubris: ensis sed per offensa quid.
36-
37-
> Inminet in nova Deucalioneas piscem condor fit est tristes aevum alternaque
38-
> munere patriam **ut esse** petitis maturus ingenium fuit! Tactu par nisi amori
39-
> simul cum iam bene iacens dentes deus [mutavit
40-
> paelex](http://quoque-ratione.io/), veni. Confugit Iolao quod, ore falsa
41-
> vestros clipeo *iuvenalia* ceciderunt ignis, et hos ages fuisti dum diu illa,
42-
> est. Illa luna, cursus illum, quod Eueni fatale sentire.
43-
44-
Corpora inquam tamen deducentia saepes perterrita, telae, pavefacta, mox partes
45-
verus, cara et pleni vel. Circumvolat debes diu dat mille quoque manum senectus
46-
increpor causa limus. Cum iuvenalibus iube potiora capiunt, natorum; falsosque
47-
Menephron.
3+
Developed by Max Bilbow as part of a Masters in Computer Science at Coventry University

docs/documentation.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# ng2react Documentation
2+
3+
ng2react is a tool that converts AngularJS components to React components using the OpenAI API. It consists of an IDE plugin, a core library, a CLI, and a feedback API.
4+
5+
![System Context Diagram](./diagrams/structurizr-1-SystemContext.png)
6+
7+
## Features
8+
9+
- **Convert AngularJS Components**: The plugin allows users to easily convert AngularJS components to React components by sending the components to the ng2react core library, which uses TypeScript for parsing AngularJS components and the OpenAI API to generate the React version of the component.
10+
11+
- **Feedback Submission**: The plugin enables users to submit feedback about the conversion results directly from the IDE. This feedback helps the ng2react team to identify areas for improvement and ensure the tool continues to meet user needs.
12+
13+
- **User-friendly Interface**: The ng2react IDE plugin is designed with usability in mind, providing a seamless experience for developers working with both AngularJS and React codebases.
14+
15+
## IDE Plugin
16+
17+
The ng2react IDE plugin is an essential component of the ng2react software system. It integrates with the user's development environment and provides an interface for converting AngularJS components to React components using the core library. The plugin also enables users to submit feedback about the conversion results directly to the feedback API.
18+
19+
Two types of IDE plugins are supported:
20+
21+
- **NodeJS Based IDE Plugins**: These plugins are built for IDEs that support NodeJS plugins, such as VSCode and Atom. They can use @ng2react/core directly.
22+
- **Other IDE Plugins**: These plugins are built for IDEs that do not support NodeJS plugins, such as IntelliJ and Eclipse. They can be immpemented via the @ng2react/cli.
23+
24+
### NodeJS Based IDE Plugin
25+
26+
![NodeJS IDE Plugins](./diagramsstructurizr-1-VSCode_IDE.png)
27+
28+
### Other IDE Plugins
29+
30+
![Generic IDE Plugins](./diagrams/structurizr-1-Generic_IDE_CLI.png)
31+
32+
## Ng2React
33+
34+
### Core
35+
36+
The ng2react core library is responsible for converting AngularJS components to React components. It leverages the TypeScript AST for parsing AngularJS components and uses the OpenAI API to generate the corresponding React components.
37+
38+
### CLI
39+
40+
The ng2react CLI is a command-line interface that enables developers to convert AngularJS components to React components without using an IDE plugin. It provides a convenient way for developers to integrate the ng2react functionality into their existing workflows and tooling.
41+
42+
### Feedback API
43+
44+
The feedback API allows users to submit feedback about the conversion results directly from the ng2react IDE plugin. It stores the feedback data in a database for later analysis and review by the ng2react team. This feedback is essential for identifying areas for improvement and ensuring the tool continues to meet user needs.
45+
46+
![Feedback API](./diagrams/structurizr-1-Feedback_API.png)
47+
48+
## Existing Plugins
49+
50+
[VSCode](https://marketplace.visualstudio.com/items?itemName=maxbilbow.ng2react-vscode)
51+
52+

docs/getting-started.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Getting Started
2+
3+
1. Get an OpenAI API key from <https://openai.com/>
4+
2. Add the OpenAI API key to your IDE extension settings
5+
3. Open an AngularJS project and ensure that the source roots are configured correctly
6+
4. Run the `ng2react: Check Connection` command
7+
5. Install the `@ng2react/support` library in your AngularJS project: `npm install --save @ng2react/support`
8+
9+
## Project Recommendations
10+
11+
### Testing, testing testing
12+
13+
The generated code is not guaranteed to be correct. It is generated by an AI model and may contain bugs. It is highly recommended that you write UI tests that will work for both AngularJS and React.
14+
15+
If you currently use Protractor, you may want to consider switching to [Cypress](https://www.cypress.io). Cypress is a modern testing framework that is much easier to use and maintain than Protractor. It also supports both AngularJS and React.
16+
17+
Good behavioural tests will help you catch bugs in the generated code and have confidence that parity has been achieved.
18+
19+
### Use a UI component library
20+
21+
## Configuration
22+
23+
Important configuration options.
24+
25+
### OpenAI Settings
26+
27+
- `ng2react.openai.apiKey`: The OpenAI API key to use for generating React components from AngularJS components.
28+
- `ng2react.openai.model`: The OpenAI engine to use for generating React components from AngularJS components. Defaults to `gpt-4`.
29+
- `ng2react.openai.temperature`: The OpenAI temperature to use for generating React components from AngularJS components. Defaults to `0.2`.
30+
- `ng2react.openai.orginization`: An optional organization ID assiciated with your OpenAI account and can be used to prevent OpenAI from using your code to train their models.
31+
32+
### Project Settings
33+
34+
- `ng2react.source.angularRoot`: The source root of your AngularJS code. Defaults to `src`.
35+
- `ng2react.source.reactRoot`: The source root of your AngularJS code. Defaults to `src`.
36+
- `ng2react.source.testRoot`: The source root where React unit tests should be generated. Defaults to `src/test`.
37+
38+
![VSCode Project .settings.json](./images/vscode_guide_project-settings.png)
39+
40+
## Examples
41+
42+
Have a look at some examples in [@ng2react/examples](https://github.com/ng2react/examples)

docs/images/tech-icons.png

878 KB
Loading
485 KB
Loading
47.3 KB
Loading
977 KB
Loading
140 KB
Loading

0 commit comments

Comments
 (0)