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

davidgs

v1.3.1

Published

A personal NPX card for David G. Simmons (davidgs)

Downloads

22

Readme

npx-card

$ npx davidgs

Generate your own npx <your_username> card easily with provided configurations. 😃 Fork & get started and leave a star ⭐ to this repo

NOTE: Do not install this package as a global package i.e. npm -g davidgs. Always use npx davidgs to view the card as this package won't be used as any other command


available scripts

  • build: to build the output (entry point for the script: src/index.js)
  • view: to view the output (entry point for the script: src/card.js)
  • prepublish: runs before the npm publish command to generate the build

files:

| file name | path | usage | |------------------------|-------------|-------------------------------------------------------------| | index.js | src/ | entry point file / to generate the output | | card.js | src/ | to read the output | | boxen.config.js | src/config/ | boxen color, bgColor, style, etc configuration | | chalk.config.js | src/config/ | chalk configuration for various methods | | io.config.js | src/config/ | io provide the path of output file | | boxUI.js | src/user/ | boxen js user defined UI options | | data.js | src/user/ | user data with configuration | | createConsoleString.js | src/utils/ | creates the console string which need to be saved as output | | io.js | src/utils/ | to read and write the file to the output location | | output | bin/ | output file which needs to be displayed |


config files:

  • boxen.config.js: provides the various colors, styles, text aligns and box styles parameters.
    • exports: This file exports four objects:
      • BOXEN_COLOR: BLACK, RED, GREEN, etc...
      • BORDER_STYLE: TOPLEFT, TOP, TOPRIGHT, RIGHT, BOTTOMRIGHT, BOTTOM, BOTTOMLEFT, LEFT
      • TEXTALIGN: LEFT, RIGHT, CENTER
      • BOX_STYLE: SINGLE, DOUBLE, ROUND, BOLD, SINGLEDOUBLE, DOUBLESINGLE, CLASSIC, ARROW
    • usage: for complete usage and for more example please visit BoxenJS
    import {
      BOXEN_COLOR,
      BORDER_STYLE,
      TEXTALIGN,
      BOX_STYLE
    } from './config/boxen.config.js' // use relative path here to your file
    
    // use these while creating boxUI.js or while using boxen() method
    
    BOXEN_COLOR.RED     // to provide color to the box
    BOXEN_STYLE.ROUND   // to provide border style to the box
    TEXTALIGN.RIGHT     // to provide the text align in the box
    BORDER_STYLE.TOP    // to provide custom deign to the box
  • chalk.config.js: It provides colors, background colors, Modifiers and color methods for custom color.
    • exports: This file exports four objects
      • COLORS: colors methods
      • BGCOLORS: background color methods
      • MODIFIERS: style modifiers for the text
      • COLORMETHODS: methods to provide the custom colors / user defined colors
    • usages: for complete usage and for more example please visit ChalkJS
    import {
      COLORS,
      BGCOLORS,
      MODIFIERS,
      COLORMETHODS
    } from './config/chalk.config.js'; // use relative path here to your file
    
    // use these methods in data.js file or with chalk library
    COLORS.blue         // provide color to the text
    BGCOLORS.white      // provide background color to the text
    MODIFIERS.bold      // provide styles to the text
    COLORMETHODS.rgb    // use method to provide custom colors for both text color and text background color
  • io.config.js: provide the __dirname functionality to the ES modules to generate output correctly

How to publish your own card:

  • fork/clone this repo
  • change the data in src/user/data.js file
  • login to your npm account using npm login
  • publish this to npm using npm publish
  • udpate the package version using below commands
    • patch: npm version patch to update last version number v1.0.1
    • minor: npm version minor to update middle version number v1.1.0
    • major: npm version major to update the first version number v2.0.0

License

MIT Copyright (c) 2023 David G. Simmons (davidgs)