0.0.7 • Published 8 months ago

@winglibs/simtools v0.0.7

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

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.

0.0.7

8 months ago

0.0.5

12 months ago

0.0.6

12 months ago

0.0.3

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago