Build PHP Puzzle Files | ![]() |
---|
This metawork article explains how I build the PHP puzzle files. The JavaScript module build-php-files.mjs creates the PHP file for one or all puzzles. This PHP file is like a wrapper for the puzzle - it displays the header, the HTML content of the puzzle, and the footer. The footer has the controls to display and solve a puzzle. Below is the source code.
/* jshint esversion: 6 */ // 1. Change cwd: cd /projects/mysterymaster.com/metawork/js/server // 2. Run script: node build-php-files.mjs import { buildPHPFiles } from "./Filer.js"; const puzzleName = null; // Builds PHP file for one or all puzzles. buildPHPFiles(puzzleName);