@sap/mta-lib
TypeScript icon, indicating that this package has built-in type declarations

1.7.4 • Public • Published

@sap/mta-lib

Javascript wrapper library for creating, reading and modifying multi-target application development descriptor files.

Requirements

This library uses Cloud MTA version 1.0.0. It is not required to install it to use the library, but if it is found in the path in the correct version, it will be used. Otherwise, this library will download it.

Sample usage

Adding a new module:

import { Mta, mta } from "@sap/mta-lib";
import * as path from "path";

let projectPath; // = ...

const mtaObj = new Mta(projectPath);

const mtaModule: mta.Module = {
  name: this.appName,
  type: "my-type",
  path: path.relative(this.appOptions.projectPath, this.appPath),
  parameters: {
    "disk-quota": "DISK_QUOTA",
    memory: "MEMORY",
  },
  requires: [
    {
      name: this.appOptions.projectName + "suffix",
    },
  ],
};

await mtaObj.addModule(mtaModule);

// ...

try {
  await mtaObj.save();
} catch (e) {
  console.log(e);
}

Packaging with webpack

To use this library from an application packaged with webpack, you have to follow the instructions for packaging the mta-local package.

Readme

Keywords

none

Package Sidebar

Install

npm i @sap/mta-lib

Weekly Downloads

151,957

Version

1.7.4

License

SEE LICENSE IN LICENSE

Unpacked Size

73.3 kB

Total Files

16

Last publish

Collaborators

  • sap_extncrepos