-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced Compiling
Compound is a fairly advanced compiler for its purposes, and supports the ability to separate the raw .c.html files from the compiled .html files.
To do this particular compilation pattern, we advise a folder structure like so:
- Root Project Directory
| - raw
| - transcludes
With this structure, raw will contain your raw .c.html files, transcludes will contain the snippet documents that are to be transcluded into other HTML documents, and the compiled .html files would exist in the Root Project Directory. This particular setup works very well with GitHub Pages (and is similar to the setup used for scratso.github.io).
It's important to note that the transclude files are not placed into raw. This is because, in most cases, users will reference transclusions relatively as transcludes/file.html. Unfortunately, this format wouldn't work if nested within raw, as users would then need to reference raw/transcludes/file.html, as all relative paths operate from the folder from which the compile command was executed.
From this setup, to compile the raw folder (with no additional flags), we can simply run:
$ python(3) Compound.py ./raw -b .
(Remember to replace Compound.py with the path to your Compound compiler .py file.)
This command will compile the contents of the raw folder into the build directory of . - the current working directory.
This documentation (and the contents of this wiki) is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/. Forking, developing, and expanding this wiki is therefore welcome.