0.0.8 • Published 3 months ago

bicep-node v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

bicep-node

Node wrapper to expose functionality for programatically interacting with Bicep files.

npm version

Usage

Importing

Install this package, and add the following:

import { Bicep } from 'bicep-node';

Installing Bicep CLI

Install the Bicep CLI to a temporary folder. bicepPath will be set to the location of the Bicep CLI. This will install the current latest version of Bicep.

const parentPath = os.tmpdir();
const bicepPath = await Bicep.install(parentPath);

Install a particular version of the Bicep CLI.

const bicepPath = await Bicep.install(parentPath, '0.25.3');

Using the Bicep CLI

Compiling a Bicep file.

const bicep = await Bicep.initialize(bicepPath);

const bicepFile = '/path/to/main.bicep'
const result = await bicep.compile({ 
  path: bicepFile,
});

Closing the connection to Bicep CLI after usage.

bicep.dispose();

Examples

See Examples for some example usages.

0.0.8

3 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago