Skip to content

Latest commit

 

History

History

simtools

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

simtools

This library is a set of tools that are supposed to make the user of the simulator a happier developer.

For the time being, it contains only one function, addMacro().

Using addMacro

This function adds a Macro into the target resource's interaction pane in Wing Console. Every macro that is added is seen as a button on the right side panel.

The following code:

bring cloud;
bring simtools;

let bucket = new cloud.Bucket();

simtools.addMacro(bucket, "Clean", inflight () => {
  for i in bucket.list() {
    bucket.delete(i);
  }
});

simtools.addMacro(bucket, "Populate",  inflight () => {
 for i in 1..10 {
  bucket.put("{i}.txt", "This is {i}");
 }
});

Will create two buttons on the Bucket resource on the right side panel:

  • Clean
  • Populate

image

Prerequisites

Installation

npm i @winglibs/simtools

License

This library is licensed under the MIT License.