You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

6 years ago
  1. # VHDL Fomatter
  2. Online VHDL formatter written in Typescript
  3. [Try it here: https://g2384.github.io/VHDLFormatter/](https://g2384.github.io/VHDLFormatter/)
  4. ---
  5. ## Run Locally
  6. Simply download/clone this repository, and open the `index.html` file.
  7. ---
  8. ## Contribute
  9. ### Structure
  10. - `index.html`: html + javascript. Collect settings from UI, call the beautify function, load/save/update cached settings.
  11. - `main.ts`: typescript. Some code required by `index.html` are moved here.
  12. - `VHDLFormatter.ts`: typescript. Define classes, format VHDL code
  13. - `tests`: folder. Contain all test files
  14. - *.test.ts: typescript. Proper test files.
  15. - `VHDLFormatterUnitTests.ts`: typescript. Handcrafted, crude tests.
  16. - `VHDLFiles`: vhdl. Contain complicated VHDL files which I don't want to lose.
  17. ### Develop
  18. Use Visual Studio Code to open the repo folder.
  19. ### Run Tests
  20. Tests must be run before each commit.
  21. #### Run Unit/Integration Tests
  22. 1. open repo folder with Visua Studio Code
  23. 2. click `Run (Ctrl + Shift + D)`
  24. 3. select `Run Unit Tests` configuration
  25. 4. click `Start Debugging` button
  26. #### Run Jest Tests
  27. 1. open repo folder with Visua Studio Code
  28. 2. click `Terminal` -> `Run Task...`
  29. 3. select `npm: test jest`