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

react-show-greeting

v1.0.1

Published

Demonstration project project created using the react-package-publisher. Please visit the gitHub link for more details.

Downloads

7

Readme

react-package-publisher

react-package-publisher is a toolkit for reactjs developers to build, test and publish a react component to the Node Package Magaer(npm). This project contains important commands in a script file to build, test and publish a package.

react-show-greeting is reactjs based package published using the react-package-publisher. This is an example package to greet you once you type-in your name.

Usage

  • Fork or clone this repo.

  • Change the directory to, react-package-publisher

  • Edit the package.json with your package name, version, author, license, dependencies, devDependencies etc. Please note, the peerDependencies are already set for a specific version of react and react-dom. Please feel free to change the versions suitable to your need. If you are new to the npm dependency management, please read this.

  • Create your component file and write the component code.

  • Run the build.sh file. Please note, use a unix based terminal(example, GitBash) to run the build.sh file.

    
    ./build.sh
    

What is in build.sh file?

The build.sh file is the main file that helps in building, packaging and publishing your react component to the npm. It helps automating many steps that are usually need to execute line by line and time consuming. It contains commands to faciliate the followings,

  • Check Node, NPM and Yarn Versions.
  • Remove the existing dist folder. This folder will be generated at the compilation step automatically.
  • Remove the existing index.js file. This file will be generated at the compilation step automatically.
  • Perform yarn install(Dependency Management).
  • Build Components and creates index.js file and dist folder.
  • Copy other required files like, README.MD, *.scss etc files to the dist folder.
  • Create a tarball npm for local testing.
  • Login and Publish. Here are 2 ways to login
      1. Using Intercative mode(Default) => npm login will ask for username, password and email.
      1. Using non interactive mode => Edit the file to comment the above option and uncomment the line starts with npm-login-noninteractive. Please edit the required parameter values like, <USER_NAME>, and . Please install npm-login-noninteractive globally as a depenency to use this option.

Further Read

A step-by-step turorial to use this toolkit is on the way, please stay tuned.