Open FanJups opened 2 years ago
I just created a project to manage tasks
Hello, sorry for delayed response. Thanks for this. I will follow :)
Suggest to use "var" or "let" #52
Future project : translate hand written html code into Js
These steps need to be updated but to make it simple, these are the basics.
To know more about the "WHY" of this project: https://github.com/osscameroon/js-generator/issues/91
The user has choice to copy and paste html code or submit file as input then get a Js code or file as output. It will be also possible to get both Js code or file if the user wants to do so. I mean, if the user choose the Js code as output, it would be possible to get also the file. If the user choose the Js file as output, it would be possible to get also the content.
First, we ask the user if the html input contains only HTML 5 tags or not (there are some custom tags) then we'll raise exception if custom tags are used or not. To be more precise, we'll throw exception if the user informed us that there are only HTML 5 tags but custom tags are also present. On the other hand, we do nothing if the user informed us that there are custom tags.
Secondly, we will ask if the user wants to use LET or VAR or CONST
We will think about how to implement it for each sub project: Maven & Gradle Library, REST APIs, Web & Desktop Apps and Command Line Interface tool.
Goals:
There are 3 environments : Web, APIs to consume and dependency.
Web
feature 1 (html code -> js code): there are 2 inputs, one for html code and the other for generated js code, the users will be able to copy and paste on the html input but only copy from the js input (In process)
feature 2 (html file -> js code): upload an html file and generate a js code (copy only)
feature 3 (html code -> js file): generate a js file based on the html code as input (copy and paste)
feature 4 (html file -> js file): upload an html file and generating a js file (In process)
APis
There will be 4 APIs related to the 4 web features.
Dependency
There are 2 ways to read Html files, from CLI or directly from a defined folder. Whether we are using CLI or not, the html file could be inside the default "src/main/resources/htmlFilesInput/" folder or defined folder choosen by the user.
Generated js file could be inside the default "src/main/resources/jsFilesOutput/" folder or defined folder choosen by the user.
The following features should respect the these previous rules.
feature 1 : html code -> js code (In process) There is already a method called convert to do that
The dependency will provide methods that are called by APIs
(The following steps should be corrected) 6 steps:
A method returning a String Object containing Js from a String Object containing Html as parameter.
A method generating a Js file from Html file as parameter : 2.1) Library environment (CLI : A method generating a Js file from Html file as argument) && 2.2) Web environment
We'll add all the required tests, javadocs , refactor the code as much as possible. In order to better understand the Jsoup library, there are links in the README file.
Publish on Maven Central in order to get our own Maven / Gradle dependency. @elroykanye, you shared some interesting links, we'll look at it on step 5 https://github.com/osscameroon/js-generator/pull/11
Building the API with Spring Boot, we will have 2 main endpoints related to 1. & 2. We will build the frontend with Angular or whatever...
We are at step 3