build system

When you run “npm run build” in the Conzept app directory (located in “app/explore2/”), the script is executed.

When this build script runs, the following things happen:

  • The existing build-directory (“dist”) is removed (if it exists).
  • Check & create the “conzept” user (used for running the proxy services).
  • Check & create the Conzept configuration directorty (“/etc/conzept”).
  • Check & create the Conzept settings file (“/etc/conzept/settings.conf”).
  • Read the Conzept settings file (and set its values as environment variables in the current shell).
  • Generate the Conzept JS environment file (located in “app/explore2/src/core/env.js”) from these environment variables (so these settings can also be used within JS code).
  • Transform the HTML / PHP template files in all apps (by inserting the Conzept environment variables).
  • Setup the Conzept proxy services (only done once).
  • Build the Conzept Wikipedia app (using esbuild).
  • Build the main Conzept “explore2” app (using ebuild).
  • Bundle all Conzept API-fetch scripts into one file (this allows for auto-inclusion of any new API-fetching code).