npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

progress-logs

v0.0.2

Published

A simple tool to make your Node application running log formatting and clarity

Downloads

2

Readme

Translate

中文文档

Why use progress-logs

When developing the node program, the program running log may sometimes be confused and scattered, which can not effectively distinguish.

progress-logscan make your program log structured and clear. With dynamic loading effect, Emoji expression makes your blog more personalized and meaningful.

How to use

It is easy to use progress-logs, and you can add it into the existing code logic and get an effectively logs for your code.

1. Create a progress log queue
const ProgressLog = require('progress-logs')

const progressLog = new ProgressLog({
    title: 'Build and publish',
    record: true,
    loadingEffect: 18
})

At this time,you can configure the log main title: title,either record the time or not: record,running effect: loadingEffectdefault: 18, See here for more

2. Add specific log items
progressLog.add('Linting', 'npm run lint')
progressLog.add('Bundled created', 'npm run build')
progressLog.add('Release', 'npm publish')

Through this list, you can also clearly know the whole process of running the program.

When adding items, you can customize the emoji icon and color of success, warning, and failure for each log item.

See here for available emoji icons and colors: emoji iconscolors

// when incoming is string, default to specify the value of success status
progressLog.add('Linting', 'npm run lint', { color: 'green', emoji: 'heart' })

// when incoming is object, you can specify the respective values of success, failure and warning
progressLog.add('Linting', 'npm run lint', {
    color: { success: 'green', warning: 'yellow', error: 'red' },
    emoji: { success: 'heart', warning: 'heavy_multiplication_x', error: 'warning' }
})
3. Adding log actions into your code
progressLog.start()   // start the log item
progressLog.next()    // run next log item
progressLog.end(0)    // end with exit code. 0:success 1: fail 2:warning

Customization

You can set the global success, warning and failure status emoji icons and colors with the follow method
progressLog.setGlobalLogEmoji({
    success: 'heart',
    fail: 'heavy_multiplication_x'
})
progressLog.setGlobalLogColor({
    success: 'green'
})

Emoji platform support

Due to the inconsistent support of Emoji in various platforms and terminals, it may lead to inconsistent display.

As my main development platform is Windows, so I had tried WebstormVSCode under Windows Platform. Founded that the 'vscode' terminal has better support for Emoji, while the 'webstorm' terminal is relatively poor. So I filter some available icon sets are provided here. You can choose them when you customize them.

All available emoji icons

Available emoji icons for win32 webstorm