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

create-nextjs-ts-redux-app

v1.0.0

Published

A simple generator to create the ultimate React NextJS boilerplate, scalable, clean and easy to use.

Downloads

1

Readme

About The Project

As a professional developer that loves doing side projects in my free time, it just puts me off to think about having to spend a day or two just configuring my project rather than coding. Therefore I created the ultimate boilerplate project and with utmost pleasure and excitement I share it with all of you so that you can get started with coding right away!

This is a generator for the starter template (boilerplate) project that uses NextJS, Typescript, SASS, Redux Toolkit, RTL (React Testing Library), Jest, ESlint, Prettier and Git Hooks (Husky). It is everything that you need to get started and has the most useful react scripts already added. Check Scripts for more information.

The boilerplate has the best linter rules to get started with, as well as the eslint-plugin-jsx-a11y accessibility plugin to write the best code possible. These are initial configurations that you are not bound to and can be customized to your liking. You can easily make your own configurations, change some of the used frameworks (you could swap SASS for MUI or some other styling framework that you love!).

Built With

This section lists any major frameworks and tools that I used to build the boilerplate.

Getting Started With create-nextjs-ts-redux-app

Installation and Setup

Simply run:

npm i -g create-nextjs-ts-redux-app

Go into the directory you wish to install your boilerplate.

create-nextjs-ts-redux-app {name of your project}

E.g:

create-nextjs-ts-redux-app my-awesome-app

Alternatively you can run:

npx create-nextjs-ts-redux-app my-awesome-app

Alternatively, clone down the repository.

You will need node and npm installed globally on your machine.

Installation of the boilerplate:

npm install

To Start Dev Server:

npm run dev

To Visit App:

localhost:3000

Getting Started With NextJS Boilerplate

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g
  • onchange - used in the scripts to listen for changes in files and automatically format them for you.
    npm install -g onchange
  • rimraf - needed in the clean script. It's used to bypass issues with removing node_modules in Windows.
    npm install -g rimraf

Usage

Scripts

I've added the following scripts for convenience. Feel free to modify them to your liking.

  • npm start: Starts your production build. Requires you to run npm run build beforehand.
  • npm run dev: Starts the development server, initially formats all of your code and runs prettier watch mode.
  • npm run build: Build your code for production.
  • npm run lint: Runs ESlint to check and fix errors automatically. This script is used by Husky.
  • npm run lint:fix: Runs lint and fixes any found errors.
  • npm run prettier: Outputs prettier errors.
  • npm run prettier:fix: Fixes all prettier errors.
  • npm run prettier-watch: This script uses onchange to watch for any changed files and fixes them automatically.
  • npm run format: Formats all of your files based on both prettier and eslint configs.
  • npm run prepare: Prepares .husky
  • npm run test: Runs jest configuration.
  • npm run test:watch: Runs jest watch mode.
  • npm run clean: Removes node_modules and package-lock.json.
  • npm run reinstall: Creates a clean installation.

Git Hooks - Husky

Git Hooks are a really handy tool for automating tasks around git. I've initialized husky and added the following hook:

  • pre-commit hook: Checks for eslint errors and fixes them automatically for you when you are commiting. Once it has finished its job, your commit is finished.

Feel free to add more hooks. Read more about husky.

Support me

"Buy Me A Coffee"

Donate

Deployment

  • npm run build - Builds the app for production. It correctly bundles React in production mode and optimizes the build for the best performance. Your app is ready to be deployed!

Once you have ran npm run build, you can run the production build locally with npm start.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Author

Project Link: nextjs-ts-rtl-jest-prettier-boilerplate

Acknowledgements

Deep appreciation to my greatest assistant: