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.

48 lines
1.4 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. Build Status: [![Main Branch](https://github.com/g2384/VHDLFormatter/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/g2384/VHDLFormatter/actions/workflows/ci.yml)
  5. ---
  6. ## Run Locally
  7. Simply download/clone this repository, and open the `index.html` file.
  8. ---
  9. ## Contribute
  10. ### Structure
  11. - `index.html`: html + javascript. Collect settings from UI, call the beautify function, load/save/update cached settings.
  12. - `main.ts`: typescript. Some code required by `index.html` are moved here.
  13. - `VHDLFormatter.ts`: typescript. Define classes, format VHDL code
  14. - `tests`: folder. Contain all test files
  15. - *.test.ts: typescript. Proper test files.
  16. - `VHDLFormatterUnitTests.ts`: typescript. Handcrafted, crude tests.
  17. - `VHDLFiles`: vhdl. Contain complicated VHDL files which I don't want to lose.
  18. ### Develop
  19. Use Visual Studio Code to open the repo folder.
  20. ### Run Tests
  21. Tests must be run before each commit.
  22. #### Run Unit/Integration Tests
  23. 1. open repo folder with Visua Studio Code
  24. 2. click `Run (Ctrl + Shift + D)`
  25. 3. select `Run Unit Tests` configuration
  26. 4. click `Start Debugging` button
  27. #### Run Jest Tests
  28. 1. open repo folder with Visua Studio Code
  29. 2. click `Terminal` -> `Run Task...`
  30. 3. select `npm: test jest`