CI scripts

Usage no npm install needed!

<script type="module">
  import valueaddCi from 'https://cdn.skypack.dev/@valueadd/ci';


CI Scripts


npm install @valueadd/ci --save-optional

Commands and usage


Print version based on package.json and git commit hash.

validate-branch <branch>

Check if branch is correctly named


Check if all nx tags are valid.

validate-commit <branch>

Check if commit messages are correctly formatted.

prettier-check <files>

Check with prettier if files are correctly formatted.

build-affected [options]

Build affected apps.

--base <base> - base commit or branch for finding affected apps

--buildFlags <buildFlags> - build flags eg. --aot --build-optimizer=false (default: "--aot --build-optimizer=false")

--head <head> - head commit or branch for finding affected apps

--nodeFlags <nodeFlags> - nodejs flags eg. --max-old-space-size=6144 (default: "")

--npmCommands <npmFlags> - additional npm commands to run before build separated with && eg. build:ci:prepare && build:ci:notify (default: "")


Create ci.json5 file in repository with the following content:

  branch: {
    types: ['feature', 'bugfix', 'hotfix', 'release', 'refactor'], // types of branches
    pattern: '(.*)' // RegExp that overrides "types" (types are ignored)
  commit: {
    maxLength: 100, // max commit length
    types: [
      // available types in commits
    scopes: ['test', 'report', 'document'] // available scopes in commits
  prettier: {
    extensionsToCheck: ['.json', '.ts', '.js', '.html', '.css', '.scss'] // extensions to check with prettier