Command invocation
Build from source
Install with npm:
npm install "@sap/cds-compiler"
Or maintain your package.json dependencies as follows:
"dependencies": {
"@sap/cds-compiler": "latest"
}
@sap/cds-compiler is available on Artifactory. There are release builds, milestones
and snapshots.
# Releases
npm install --@sap/registry="https://int.repositories.cloud.sap/artifactory/api/npm/build-releases-npm/" @sap/cds-compiler
# Milestones
npm install --@sap/registry="https://int.repositories.cloud.sap/artifactory/api/npm/build-milestones-npm/" @sap/cds-compiler
# Snapshots: List available versions first, then install specific version.
npm view --@sap:registry="https://int.repositories.cloud.sap/artifactory/api/npm/build-snapshots-npm/" @sap/cds-compiler versions
npm install --@sap:registry="https://int.repositories.cloud.sap/artifactory/api/npm/build-snapshots-npm/" @sap/cds-compiler@<version>The compiler with its options is invoked like any other npm/Unix command:
cdsc <command> [options] <file...>See cdsc --help for commands and options.
The exit code of the process is:
0: successful compilation1: compiled with error (the command invocation itself is ok)2: command invocation error (invalid options, repeated file name)
We recommend to install cds-compiler using npm. If you want to use
the latest code (for example, for testing purposes) then you need to set up the
compiler first:
git clone --recursive https://github.tools.sap/cap/cds-compiler.git
cd cds-compiler
git submodule update --init
npm install
npm run download --artifactory # Downloads Antlr (Java Dependency)
# Without option, it uses the public Maven repository.
npm run gen # Generates the parser
./bin/cdsc.js --helpPlease refer to the official CDS documentation.
In case you find a bug, please report an incident on SAP Support Portal.
This package is provided under the terms of the SAP Developer License Agreement.