I tried to make the API simple, but any feedback is welcome. Let me know if you would like to improve something!
const prog = progress({
message: 'Your initial message' // Message next to the bar. Default to ''
showPercentage: true, // Whether to show percentage after the bar or not. Default to false
width: 50, // How many characters long. Default to 25
});
prog.update(0.5 /* value between 0 and 1*/, { message: 'Your new optional message' })
prog.stop() // Complete the bar and add new line
P.S. At the moment I am importing the function directly in the example because I am not completely sure how to
๐ Linked issue
N/A
โ Type of change
๐ Description
Added a new progress bar with a simple API:
https://github.com/unjs/consola/assets/22072217/dd9fa62d-01d8-449f-a2ef-8e4b722abbd6
I tried to make the API simple, but any feedback is welcome. Let me know if you would like to improve something!
P.S. At the moment I am importing the function directly in the example because I am not completely sure how to
๐ Checklist