Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangfuxing committed Mar 27, 2024
1 parent 5129ddd commit 22afdf2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ ProgressBar in terminal for deno
#### example

```ts
import { MultiProgressBar } from "https://deno.land/x/[email protected]/mod.ts";
import { MultiProgressBar } from "https://deno.land/x/[email protected]/mod.ts";
import { delay } from "https://deno.land/[email protected]/async/delay.ts";
// or JSR
// import { MultiProgressBar } from "@deno-library/progress";
import { delay } from "https://deno.land/[email protected]/async/delay.ts";
// import { delay } from "@std/async";

const title = "download files";
const total = 100;
Expand Down Expand Up @@ -148,10 +149,10 @@ What is displayed and display order, default: ':bar :text :percent :time
#### simple example

```ts
import ProgressBar from "https://deno.land/x/[email protected].7/mod.ts";
import ProgressBar from "https://deno.land/x/[email protected].8/mod.ts";
// or JSR
// import ProgressBar from "@deno-library/progress";
import { delay } from "https://deno.land/std@0.210.0/async/delay.ts";
import { delay } from "https://deno.land/std@0.220.1/async/delay.ts";

const title = "downloading:";
const total = 100;
Expand All @@ -173,10 +174,10 @@ await download();
#### complex example

```ts
import ProgressBar from "https://deno.land/x/[email protected].7/mod.ts";
import ProgressBar from "https://deno.land/x/[email protected].8/mod.ts";
// or JSR
// import ProgressBar from "@deno-library/progress";
import { delay } from "https://deno.land/std@0.210.0/async/delay.ts";
import { delay } from "https://deno.land/std@0.220.1/async/delay.ts";

const total = 100;
const progress = new ProgressBar({
Expand Down
3 changes: 1 addition & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "@deno-library/progress",
"version": "1.4.7",
"version": "1.4.8",
"exports": "./mod.ts",
"lock": false,
"imports": {
"@std/assert": "jsr:@std/assert@^0.220.1",
"@std/async": "jsr:@std/async@^0.220.1",
"@std/fmt": "jsr:@std/fmt@^0.220.1",
"colors": "jsr:@std/fmt@^0.220.1/colors.ts",
"rx_webstreams/": "https://deno.land/x/[email protected]/",
"simpleTimerStream": "https://deno.land/x/[email protected]/mod.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/changeColor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ProgressBar from "../mod.ts";
import { green, yellow } from "colors";
import { green, yellow } from "@std/fmt/colors";
import { delay } from "@std/async";

const total = 100;
Expand Down
2 changes: 1 addition & 1 deletion examples/colorProgression.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ProgressBar from "../mod.ts";
import { bgRgb24 } from "colors";
import { bgRgb24 } from "@std/fmt/colors";
import { delay } from "@std/async";

const total = 100;
Expand Down
2 changes: 1 addition & 1 deletion examples/preciseBar.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ProgressBar from "../mod.ts";
import { bgWhite, green } from "colors";
import { bgWhite, green } from "@std/fmt/colors";
import { delay } from "@std/async";

const total = 100;
Expand Down

0 comments on commit 22afdf2

Please sign in to comment.