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-vite-tailwind

v1.0.1

Published

This is a Command Line Interface (CLI) tool designed to automate the process of initializing a new ReactJS project with Vite and TailwindCSS. This tool can be very helpful for developers/users who frequently initiate ReactJS projects with these configurat

Downloads

26

Readme

ReactJS-Vite-TailwindCSS Project Initializer CLI

This is a Command Line Interface (CLI) tool designed to automate the process of initializing a new ReactJS project with Vite and TailwindCSS. This tool can be very helpful for developers/users who frequently initiate ReactJS projects with these configurations.

Features

  1. Asks for your Project's name.
  2. Asks you to pick JavaScript or TypeScript.
  3. Asks if you want to initialize a Git repository.

Usage

Note: This tool requires Node.js installed.

  1. Clone this repository to your local machine.
  2. Navigate into the cloned repository using your Terminal/Command Prompt.
  3. To install all necessary packages, run: npm install.
  4. To start the CLI tool, run: node index.js.

Using npx

You can invoke this package using npx:

npx create-vite-react-tailwind

Development Journey

Working on this project was an exciting and fun journey. Challenges encountered during this project were primarily related to synchronously running shell commands in Node.js and overcoming the limitations of ES Modules with the Inquirer.js package.

During the early phase of the project I used the child_process.exec method from the Node.js Standard Library. However, this does not stream the output in real-time. I later used child_process.spawn, but this came with the challenge of executing commands consecutively only after the previous command has completed. The final solution was to use child_process.execSync which provides a synchronous way to execute shell commands and also handles output streaming.

There was also an incidence of running into an ERR_REQUIRE_ESM error. This happened due to the introduction of ECMAScript modules within Inquirer.js from version 9.2.11. This was resolved by reverting back to version 8.0.0 which employs CommonJS modules.

Contribute

This project was built for fun, and everyone is more than welcome to use it as well as contribute. If you have any suggestions or find any bugs, please feel free to open a new issue and/or create a pull request.

License

This project is open source and is licensed under the MIT License.