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

content-gpt-rebeliq

v1.1.0

Published

A simple chrome extension template with Vite, React, TypeScript and Tailwind CSS.

Downloads

2

Readme

Table of Contents

Intro

This boilerplate is meant to be a quick start for creating chrome extensions using React, Typescript and Tailwind CSS.

Built for:

For improved DX and rapid building vite and nodemon are used.

Chrome does not accept manifest v2 extensions since Jan 2022, therefore this template uses manifest v3.

Firefox + other browsers don't yet support manifest v3, so cross browser usage is not encouraged.

  • Read more about Chrome manifest v2 support here.
  • Read more about Firefox Manifest v3 support here.

As soon as Firefox supports manifest v3, support will be added in this repo as well.

Oh by the way ... I also implemented a chrome local/sync storage hook for react, which works well with this template. Check it out here.

Why another boilerplate?

I have used webpack react boilerplates and found it too hard to configure.

Vite is actually mega easy to understand, which makes it easier to get into and to maintain for others.

I couldn't find a boilerplate for React, TypeScript and Tailwind CSS. So here it is.

Features

Usage

Setup

  1. Clone this repository.
  2. Change name and description in package.json => Auto synchronize with manifest
  3. Run yarn or npm i (check your node version >= 16)
  4. Run yarn dev or npm run dev
  5. Load Extension on Chrome
    1. Open - Chrome browser
    2. Access - chrome://extensions
    3. Check - Developer mode
    4. Find - Load unpacked extension
    5. Select - dist folder in this project (after dev or build)
  6. If you want to build in production, Just run yarn build or npm run build.

Customization

As the template has all of the potential Chrome extension pages implemented, you likely have to customize it to fit your needs.

E.g. you don't want the newtab page to activate whenever you open a new tab:

  1. remove the directory newtab and its contents in src/pages
  2. remove the newtab rollup input in the vite.config.ts
//...
build: {
    outDir,
    rollupOptions: {
      input: {
        devtools: resolve(pagesDir, 'devtools', 'index.html'),
        panel: resolve(pagesDir, 'panel', 'index.html'),
        content: resolve(pagesDir, 'content', 'index.ts'),
        background: resolve(pagesDir, 'background', 'index.ts'),
        popup: resolve(pagesDir, 'popup', 'index.html'),
        newtab: resolve(pagesDir, 'newtab', 'index.html'),  // <--- REMOVE THIS LINE
        options: resolve(pagesDir, 'options', 'index.html'),
      },
      output: {
        entryFileNames: (chunk) => `src/pages/${chunk.name}/index.js`,
      },
    },
  },
/...

CSS files in the src/pages/* directories are not necessary. They are left in there in case you want to use it in combination with Tailwind CSS. Feel free to delete them.

Tailwind can be configured as usual in the tailwind.config.cjs file. See doc link below.

Tech Docs

Credit

Heavily inspired by Jonghakseo's vite chrome extension boilerplate. It uses SASS instead of TailwindCSS if you want to check it out.

Contributing

Feel free to open PRs or raise issues!