A PID framework provides a set of commands to manage its lifecycle. As usual these commands can be called from the build folder of the environmeny project using the native build tool (e.g. make) or by using the pid script directly into the wrapper folder.

If using the build tool, the project must be configured once before using CMake:

cd <workspace dir>/wrappers/<wrapper name>/build
cmake .. #building commands

We suppose here we use the pid script but any native build system (e.g. make, ninja) can be used with same commands (these commands are then targets for the build tool and arguments are environment variables).

Commands summary

  • build: building the framework static site using jekyll.
  • serve: Looking at the resulting static web site in your web browser.
  • referencing: Referencing the framework in the workspace.
  • hard_clean: Hard cleaning of the framework build tree.
  • update: Updating framework project from its official repository.

Building the static site

  • Call: pid build
  • Effect: generates the static site described by the framework using the jekyll tool.
  • Arguments: none

  • Example: building the framework pid
pid cd pid
pid build

Output should look something like:

[100%] [PID] Building framework pid ...
Configuration file: /home/robin/soft/PID/pid-workspace/sites/frameworks/pid/build/to_generate/_config.yml
            Source: /home/robin/soft/PID/pid-workspace/sites/frameworks/pid/build/to_generate
       Destination: /home/robin/soft/PID/pid-workspace/sites/frameworks/pid/build/generated
 Incremental build: enabled
                    done in 1.597 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
[100%] Built target build

Looking at the resulting static site

  • Call: pid serve
  • Effect: serve the resulting static website into a local server. Look at the output of the command to know the URL where to find this site.
  • Arguments: none

  • Example: go into in another terminal
pid cd pid
pid serve

The command keeps running as long as you do not kill it (Ctrl+C).

For the pid framework the output looks something like:

[100%] [PID] Serving the static site of the framework pid ...
Configuration file: none
            Source: /home/robin/soft/PID/pid-workspace/sites/frameworks/pid/build/generated
       Destination: /home/robin/soft/PID/pid-workspace/sites/frameworks/pid/build/generated/_site
 Incremental build: disabled. Enable with --incremental
                    done in 3.745 seconds.
 Auto-regeneration: enabled for '/home/robin/soft/PID/pid-workspace/sites/frameworks/pid/build/generated'
Configuration file: none
    Server address:
  Server running... press ctrl-c to stop.
      Regenerating: 56 file(s) changed at 2020-06-05 10:28:17 ...done in 4.422205607 seconds.

The server address is given so than you can simply see the result locally using your web browser.

Any time the build command is used the serve will automatically regenerates the pages of the static site, you then only need to reload the pages of the web site in your web browser.

Referencing the framework in the workspace

  • Call: pid referencing
  • Effect: generates the reference file for the framework and places it in the adequate folder of the workspace. When done, the framework is known in the local workspace and will be known by all users when workspace official repository will be updated accordingly.
  • Arguments: none

  • Example:
pid cd <framework>
pid referencing

Cleaning the framework

  • Call: pid hard_clean
  • Effect: Cleaning the framework build tree in a agressive and definitive way.
  • Arguments: none

  • Example:
pid cd <framework>
pid hard_clean

Updating the framework

  • Call: pid update
  • Effect: Updating the framework project from its official remote repository.
  • Arguments: none

  • Example:
pid cd <framework>
pid update