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

make-placeholder

v0.6.0

Published

CLI for creating placeholders.

Downloads

3

Readme

make-placeholder

make-placeholder is a command-line tool designed for generating placeholders for your projects.

Getting Started

Prerequisites

  • Node.js >= 16.x

Installation

To install make-placeholder globally, use the following command:

npm install -g make-placeholder

Usage

img command

The primary command provided by make-placeholder is img. You can use this command to generate image placeholders with various customization options.

Syntax

make-placeholder img <width> [height] [options]
  • <width> (in pixels): The width of the image (required).
  • [height] (in pixels): The height of the image (optional, defaults to the width).
  • [options]: Additional options to customize the image placeholder.

Note: The units for <width> and [height] are expressed in pixels (px).

Options

  • -b, --background <background>: Set the background color for the image. Default: #cccccc.
  • -c, --text-color <text_color>: Define the text color for the text on the image. Default: #909090.
  • -t, --text <text>: Specify the text to display on the image.
  • -o, --output-path <output_path>: Set the output path for the image (e.g., "/path/to/output/example.jpeg"). If you include * in the file name, it will be replaced with the dimension of the image (only the last * will be replaced).

Note: When specifying the value for any color options, you can set the color in various formats, including Hex, RGB, RGBA, HSL, HSLA, HSV, HSVA, and Named colors.

Examples

Basic Usage

Generate a 256x256px image placeholder with default settings:

make-placeholder img 256

Basic Usage Example

Note: When not providing a custom name using the -o flag, the output file name will be automatically created based on the image dimensions, followed by the format (defaulting to JPEG). For instance, generating a 256x256px JPEG image will produce a file named "256x256.jpeg".

Customization

Generate a 512x256px image placeholder with a black background, white text, and a custom text message:

make-placeholder img 512 256 -b "#000000" -c white -t "hello world"

Customization Example

Path for Output

Generate a 128x128px image placeholder and save it to a specific directory:

make-placeholder img 128 -o "/path/to/folder/placeholder.jpeg"

Output With Different Format

The supported file formats are: JPEG(default), PNG, BMP, TIFF, and GIF

Save to a Specific Directory:

Use the following command to specify a directory path and generate an image with a dynamic filename:

make-placeholder img 64 -o "/path/to/folder/*.png"

This command will create an image named "64x64.png" in the folder you specified.

Save in the Current Directory:

If you want to save the PNG image in the current directory, use the following command:

make-placeholder img 64 -o "*.png"

This will create an image named "64x64.png" in your current working directory.

Issues

If you encounter any issues or have suggestions for improvement, please open an issue.

Contribute

Contributions are welcome! Please check the Contributing Guidelines to get started.

License

This project is licensed under the MIT License. See the LICENSE file for details.