How to compile the book - pcesarperez/Modding-never-changes GitHub Wiki

In order to compile the guide into HTML5 you will need the following tools (each version number, as of this writing; your mileage may vary):

Take into account that you will need a \*nix system to install this tools. I am using Bash on Ubuntu on Windows under Windows 10 to get the job done.

Let’s say our guide repo is cloned in the folder [$MODDING_NEVER_CHANGES], and the stylesheet factory repo is cloned in the folder [$STYLESHEET_FACTORY]. In order to compile the guide, you just need to navigate to [$MODDING_NEVER_CHANGES] and run the bash script build-doc. This script performs the following steps:

  1. Copies the SASS files, used to generate the stylesheet, from [$MODDING_NEVER_CHANGES/src/main/docs/sass] into the corresponding folders in [$STYLESHEET_FACTORY]:

    • Modding-never-changes.scss[$STYLESHEET_FACTORY/sass].

    • _Modding-never-changes.scss[$STYLESHEET_FACTORY/sass/settings].

  2. Compiles the stylesheet invoking the command compass compile into the [$STYLESHEET_FACTORY] folder. This generates the CSS file with the styles.

  3. Copies back the CSS file to the guide folder:

    • Modding-never-changes.css[$MODDING_NEVER_CHANGES/src/main/resources/styles].

  4. Runs Maven using the command mvn to compile the source Asciidoc files into the HTML5 product, which will be placed in a ZIP file inside the folder [$MODDING_NEVER_CHANGES/build].

Ideally, each and every step could be performed by Maven, using the right plugins (take a look at the file pom.xml inside [$MODDING_NEVER_CHANGES]). However, the Windows Subsystem for Linux (WSL) is still in beta, lacking certain features, like process spawning, necessary to run the compilation process with Compass. Thus, the need for a bash script.

⚠️ **GitHub.com Fallback** ⚠️