mayacakmak / se2

Control interfaces for manipulating SE2 configurations
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Pug->HTML? #1

Closed mayacakmak closed 4 years ago

mayacakmak commented 4 years ago

Codepen had a nice automatic compilation of .pug files into .html. Perhaps sure GitHub has some plugin that helps do that? If either we might want to create some sort of compilation script (possibly with instructions to install pug on computer) or we can also switch to editing HTML directly and remove the pug files.

kavidey commented 4 years ago

I looked into this a bit, it seems like we basically have two options.

  1. We can create a GitHub action, similar to something like this: https://github.com/elstudio/actions-js-build that will detect when we commit code, automatically compile it to HTML, and then make a new commit with the compiled code.
  2. We can write a script that uses a library like pypugjs or npm and pug that will compile all the pug files to html.

Some IDEs, for instance, VS Code, also have extensions and plugins that will allow them to compile pug to html in real-time https://github.com/Jaheen/VSCode-Live-Pug-Compiler

I think that it probably makes the most sense to write a script to do the compilation like you suggested. That way we can easily test code locally before pushing it, and we also aren't restricted to a single IDE.

kavidey commented 4 years ago

I created a script that does the compiling and setup a pull request with it #2