2.0.1 • Published 7 years ago

@fancyawesome/progress-service v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

Progress Service

A simple abstraction over Toastr and Nanobar to centralize vizualization of "in progress actions". Automatically tracks and vizualizes router navigation events, and exposes the ability to easy track other async operations.

Ex:

import ProgressService from "@fancyawesome/progres-service";
import { autoinject } from "aurelia-framework";

@autoinject
export class MyPage {
  constructor(private readonly progressService: ProgressService) { }
}

public async myAsyncThing() {
  const status = this.progressService.start();
  try {
    const result = await someLongOperation();
    if (result.isErr()) {
      status.cancel("Failed to do the first thing.");
    }

    status.increment();

    await someOtherLongOperation();

    status.ok("Did the thing!");
  } catch (e) {
    status.error(e);
  }
}

Based on: https://github.com/alexjoverm/typescript-library-starter

NPM scripts

  • npm t: Run test suite
  • npm run test:watch: Run test suite in interactive watch mode
  • npm run test:prod: Run linting + generate coverage
  • npm run dev: Run a server at localhost:8081 (default) for quick development
  • npm run build: Bundles code, create docs and generate typings
  • npm run build:dev: Same than build, but code is not minified
  • npm run commit: Commit using conventional commit style (husky will tell you to use it if you haven't :wink:)

To commit, you must use npm run commit, which is a convenient way to create conventional commits.

2.0.1

7 years ago

2.0.0

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.3

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago