Skip to content

Project Types

This guide provides an overview of the various customization projects supported.

General Information

The @criticalmanufacturing/cli allows you to create three types of projects:

  1. A custom project for MES v10 onwards;
  2. A custom project for MES v9 or prior versions;
  3. A MES App project.

The type of project is defined during the execution of the cmf init command, depending on the MES version selected and the value of --repositoryType parameter.

Using an Infrastructure Settings File

The examples below assume you're using an infrastructure settings file to store development environment details. Refer to the infrastructure config file specification for more information.

MES v10 onwards

For CM MES v10 and onwards customization projects, the initialization command has the following required parameters:

  • Customization Project Name;
  • Customization Project Version;
  • DEV Infrastructure Settings;
  • DEV Environment Settings;
  • CM MES, NuGets, test libraries version (usually the same version);
  • CM MES ISO location;
  • CM ngx-schematics library version;
  • Deployment Directory (the base folder for storing project installation packages).
cmf init {{project_name}} 
    --version {{my_project_version}} 
    --infra   {{dev_infra_file_path}} `
    --config  {{dev_env_file_path}} `
    --MESVersion {{mes_version}} `
    --nugetVersion {{mes_version}} `
    --testScenariosNugetVersion {{mes_version}} `
    --ISOLocation {{mes_iso_path}} `
    --ngxSchematicsVersion {{ngx_version}} `
    --deploymentDir {{deployment_directory_path}}

e.g.:

cmf init ExampleProject `
    --version 1.0.0 `
    --infra ..\config\infra.json `
    --config ..\config\ExampleEnvironment.json `
    --MESVersion 11.0.0 `
    --nugetVersion 11.0.0 `
    --testScenariosNugetVersion 11.0.0 `
    --ISOLocation \\directory\CriticalManufacturing.iso `
    --ngxSchematicsVersion 11.0.0 `
    --deploymentDir \\files\Deployments

Determining ngx-schematics Version

To determine the correct ngx-schematics version for your CM MES release:

  1. Construct the MES dist-tag:

    • Format: release-{{MES_VERSION}}
    • {{MES_VERSION}}: Concatenation of MES major, minor, and patch versions without separators.
  2. Use the npm view command (Replace ${dist_tag} by the proper value):

    npm view @criticalmanufacturing/ngx-schematics@${dist_tag} version
    

    Replace ${dist_tag} .

Per example, for MES version 10.2.5:

  • Use the MES dist-tag: release-1025
  • And the command:
npm view @criticalmanufacturing/ngx-schematics@release-1025 version 

Examples of Compatibility Matrix

MES version MES dist-tag CM ngx-schematics version
10.2.5 release-1025 1.3.6
11.0.1 release-1101 11.0.1

MES v9 or below

For CM MES v9 or prior MES versions customization projects, the initialization command has the following required parameters:

  • Customization Project Name;
  • Customization Project Version;
  • DEV Infrastructure Settings;
  • DEV Environment Settings;
  • CM MES, NuGets, test libraries version (usually the same);
  • CM MES ISO location;
  • CM HTML Generator library version;
  • CM Dev Tasks library version;
  • Yeoman library version;
  • Deployment Directory(the base folder for storing project installation packages).
cmf init {{project_name}} 
    --version {{my_project_version}} 
    --infra   {{dev_infra_file_path}} `
    --config  {{dev_env_file_path}} `
    --MESVersion {{mes_version}} `
    --nugetVersion {{mes_version}} `
    --testScenariosNugetVersion {{mes_version}} `
    --ISOLocation {{mes_iso_path}} `
    --DevTasksVersion {{cm_dev_tasks_lib_version}} `
    --HTMLStarterVersion {{cm_html_starter_lib_version}} `
    --yoGeneratorVersion {{yeoman_library_version}} `
    --deploymentDir {{deployment_directory_path}} `

e.g.:

cmf init ExampleProject `
    --version 1.0.0 `
    --infra ..\config\infra.json `
    --config ..\config\ExampleEnvironment.json `
    --MESVersion 9.0.11 `
    --nugetVersion 9.0.11 `
    --testScenariosNugetVersion 9.0.11 `
    --ISOLocation \\setups\CriticalManufacturing.iso `
    --HTMLStarterVersion 8.0.0 `
    --DevTasksVersion 9.0.4 `
    --yoGeneratorVersion 3.1.0 `
    --deploymentDir \\files\Deployments

Compatibility Matrix

MES Version HTML Starter Dev Tasks Yeoman
5.x.x 5.1.9 5.1.9 1.0.1
6.0.x 6.0.0 6.0.0 1.0.1
6.1.x 6.1.0 6.1.0 1.0.1
6.3.x 6.3.0 6.3.0 1.0.1
6.4.x 6.3.0 6.4.0 1.0.1
7.0.x 6.3.0 7.0.1 3.1.0
7.1.x 7.1.1 7.1.1 3.1.0
7.2.x 7.2.3 7.1.1 3.1.0
7.x.x 7.2.3 7.1.1 3.1.0
8.0.x 8.0.7 8.0.2 3.1.0
8.x.x 8.1.1 8.1.3 3.1.0
9.x.x 8.1.1 8.1.3 3.1.0

Note

Use npm info to determine the recommended dependencies version. e.g.:

# Check for MES release tags (`release-{{MES_VERSION}}`)
npm info @criticalmanufacturing/generator-html
npm info @criticalmanufacturing/dev-tasks

# Yeoman dependency is stated on the dependency list
# of the generator-html package, e.g.:
npm info @criticalmanufacturing/generator-html@8.1.1

MES App

A MES App project must have as its target a MES v10 or higher version. As so all requirements are defined for an MES v10 onwards customization project.

To create an App, you must specify the following additional parameters on the cmf init command:

  • Application Name;
  • Application ID;
  • Application Author;
  • Application Description;
  • Application MES Target Framework;
  • Application Licensed Name;
  • Repository Type argument must be set to App.
cmf init {{project_name}} `
    --version {{my_project_version}} ` 
    --infra   {{dev_infra_file_path}} `
    --config  {{dev_env_file_path}} `
    --MESVersion {{mes_version}} `
    --nugetVersion {{mes_version}} `
    --testScenariosNugetVersion {{mes_version}} `
    --ISOLocation {{mes_iso_path}} `
    --ngxSchematicsVersion {{ngx_version}} `
    --deploymentDir {{deployment_directory_path}} `
    --appName {{app_name}} `
    --appId {{app_id}} `
    --appAuthor {{app_author}} `
    --appDescription {{app_description}} `
    --appTargetFramework {{app_mes_target_framework}} `
    --appLicensedApplication {{app_licensed_application_name}} `
    --repositoryType "App"

e.g.:

cmf init ExampleProject `
    --version 1.0.0 `
    --infra ..\config\infra.json `
    --config ..\config\ExampleEnvironment.json `
    --MESVersion 11.0.0 `
    --ngxSchematicsVersion 11.0.0 `
    --nugetVersion 11.0.0 `
    --testScenariosNugetVersion 11.0.0 `
    --deploymentDir \\directory\Deployments `
    --appName "My App" `
    --appId "MyApp" `
    --appAuthor "Critical Manufacturing" `
    --appDescription "My First App" `
    --appTargetFramework 11.0.0 `
    --appLicensedApplication "My App" `
    --repositoryType "App"