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

@castromaciellr/template-vite-react-ts

v1.0.1

Published

A custom Vite + React + TS template, using vitest for testing

Downloads

2

Readme

Vite React TypeScript

Usage

Use Template button

Click the Use this template button above the file list, then use the Owner drop-down menu, and select the account you want to own the repository. Creating a repository from a template has the following advantages:

A repository created from a template starts with a single commit. Commits to a repository created from a template do appear in your contribution graph. Creating a repository from a template starts a new project quickly.

Development

Prerequisites

Recommended

Make it your own

To get a local copy, clone it using:

git clone https://github.com/castromaciel/template-vite-react-ts.git

Or get it downloading

rm -rf .git && git init
git add .
git commit -m "Initial commit"

Install dependencies:

To install dependencies use one of the following commands:

npm install
yarn install
pnpm install

Available Scripts

In this project, you can run the following scripts:

| Script | Description | | ------------- | --------------------------------------------------- | | npm run build | Builds the app for production to the dist folder. | | npm run coverage | Runs tests with code coverage | | npm run dev | Runs the app in the development mode. | | npm run preview | Start a local web server that serves the built solution from ./dist for previewing | | npm run prepare | Install husky githooks | | npm run test | Runs tests with vitest. |

Base Dependencies

Folder Structure

template-vite-react-ts
├── .github
    ├── workflows
├── .husky
    ├── pre-commit
    ├── pre-push
├── node_modules
├── public
│   └── vite.svg
└── src
    ├── __tests__
        ├── App.test.tsx
    ├── assets
        ├── react.svg
    ├── components
    ├── constants
        ├── index.ts
    ├── App.scss
    ├── App.tsx
    ├── index.scss
    ├── main.tsx
    └── vite-env.d.ts
├── .env.development
├── .eslintignore
├── .eslintrc.json
├── .gitattributes
├── .gitignore
├── .lintstagedrc
├── .npmrc
├── index.html
├── LICENSE
├── package.json
├── pnpm-lock.yaml
├── README.md
├── tsconfig.json
├── tsconfig.node.json
├── vite.config.js
├── vitest.config.js

husky config

To create husky githooks, you need to run npm prepare or pnpm prepare, and then configure your githooks with

npx husky add .husky/<pre-hookname> "command you want to configure"

For example, the initial config has been created with:

npx husky add .husky/pre-commit "npx lint-staged"
npx husky add .husky/pre-push "pnpm test"

You are free to modify the configuration.

Styleguide

For coding styling, I decided to use eslint and the eslint-airbnb configuration, with some personal modifications.

Credits

Vite Template React with TypeScript is built and maintained by Castro Maciel

License

This project is licensed under the terms of the MIT license.