@atlas/automata
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

Automata

Get dandy with an easy-to-use automated workflow library!

Installation: npm install --save @atlas/automata

Usage

Automata comes in handy for pretty much any requirement for automation. Below are some examples which are designed help you get started using this library.

Although most examples use pre-defined operations, the real magic to using this library is when you make self-contained operations and implement them, allowing for a dynamic and flexible usage of tasks.

TypeScript project build script:

const automata = require("@atlas/automata");

const buildDir = "./dist";
const coordinator = new automata.Coordinator();

async function build() {
    const result = await coordinator
        .then(() => automata.FileSystemOperations.forceRemove(buildDir))
        .then(() => automata.ScriptOperations.execute("tsc"))

        .run();

    const state = result.state === automata.CoordinatorState.OK ? "OK" : "FAIL";

    console.log(`Build completed with state '${state}'`);
}

build();

Package Sidebar

Install

npm i @atlas/automata

Weekly Downloads

1

Version

1.2.3

License

MIT

Unpacked Size

44.8 kB

Total Files

36

Last publish

Collaborators

  • atlas