@tangelo/tangelo-configuration-toolkit

1.22.1 • Public • Published

tangelo-configuration-toolkit

Tangelo Configuration Toolkit is a command-line toolkit which offers support for developing a Tangelo configuration.

Installation

The toolkit requires NPM on Node.js® (at least version 18.x). An active or maintenance LTS release is recommended. After installing Node.js, you can install the latest version of the Tangelo Configuration Toolkit globally on your system using the following command:

npm i -g @tangelo/tangelo-configuration-toolkit

Usage

Get help for the available commands and see version:

tangelo-configuration-toolkit

Get help for a specific command, detailing all its arguments:

tangelo-configuration-toolkit <command>

Use the tct shorthand instead of tangelo-configuration-toolkit:

tct <command>

Config

Global

TCT requires a config file to work: ${userhome}/.tct/appconfig.json
Several commands, like the deploy command, require server connection information, which can be stored in here.

The contents looks like this (all properties are optional):

{
  "sharedConfigPath": "absolute/or/relative/path/to/folder/containing/shared/config",
  "servers": [{
    "config": {
      "port": 22,
      "parallel": 4,
      "username": "username",
      "remotedir": "/absolute/path/to/tangelo/config/folder/on/server"
    },
    "domains": ["domain.name.com"],
    "name": "name-for-local-deploy"
  }],
  "serverDefaults": {
    "config": {
      ...
    }
  }
  "defaultServer": "can be set to the name of e.g. your favorite dev server",
  "defaultDatabase": "can be set to the tnsname of e.g. your favorite dev server"
}

When passing a server name, tct will look for a full match with a name or a partial match (the start) with a domain.

oXygen

The build -x commands set projects transformation scenarios and masterfiles in the oXygen project file with the following functionality:

  • Will try to preserve manually added entries in the transformation scenarios and masterfiles
  • Will remove non existing masterfiles or masterfiles that start with a '_'
  • No masterfiles / scenarios will be added if their path match with oXygens hidden directory patterns

Debug

Save this in the root of your local clone as tct-dev.cmd:

@ECHO off
SETLOCAL
CALL :find_dp0

IF EXIST "%dp0%\node.exe" (
  SET "_prog=%dp0%\node.exe"
) ELSE (
  SET "_prog=node"
  SET PATHEXT=%PATHEXT:;.JS;=;%
)

"%_prog%"  "%dp0%\index.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

Then:

  • open a 'Javascript Debug Terminal' in VSCode
  • jump to a customer folder ( you can use tan-cust for this)
  • set a breakpoint
  • type (for instance): tct-dev d -c

Readme

Keywords

Package Sidebar

Install

npm i @tangelo/tangelo-configuration-toolkit

Weekly Downloads

11

Version

1.22.1

License

SEE LICENSE IN LICENSE.md

Unpacked Size

123 kB

Total Files

34

Last publish

Collaborators

  • joery
  • iddo.fontijn