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-ts-react-extension

v0.1.6

Published

React & Redux & Tailwind bundle Web Extension Template

Downloads

4

Readme

create-ts-react-extension

React & Redux & Tailwind bundle Web Extension Template

Create React & Redux & Tailwind bundle Web Extension Template with no config.

create-ts-react-extension works on Firefox, Chrome. If something doesn’t work, please file an issue. If you have questions or need help, please ask in GitHub Discussions.

Authors

Quick Overview

npx create-ts-react-extension my-app
cd my-app
npm install
npm run build
npm run web-run:firefox

Then click on the extension popup.

//GIF TERMIANL CREATE APP

Get Started Immediately

You don’t need to install or configure tools like webpack or Babel.

You can modify your prefered manifest config

├── manifest
│   ├── beta-manifest-extra.json
│   ├── chrome-manifest-extra.json
│   ├── firefox-beta-manifest-extra.json
│   ├── firefox-manifest-extra.json
│   ├── manifest.json
│   └── safari-manifest-extra.json
...

Create a project, and you’re good to go.

Creating an App

You’ll need to have Node 14.0.0 or later version, Firefox and Chromium if you want to dev on chrome on your local development machine . We recommend using the latest LTS version. You can use nvm (macOS/Linux) or nvm-windows to switch Node versions between different projects.

To create a new app, you may choose one of the following methods:

npx

npx create-ts-react-extension my-app

(npx is a package runner tool that comes with npm 5.2+ and higher, see instructions for older npm versions)

npm

npm init ts-react-extension my-app

npm init <initializer> is available in npm 6+

Yarn

yarn create create-ts-react-extension my-app

yarn create <starter-kit-package> is available in Yarn 0.25+

It will create a directory called my-app inside the current folder. Inside that directory, it will generate the initial project structure and install the transitive dependencies:

my-app
.
├── dist
│   ├── assets
│   │   └── icons
│   │       ├── bmac2.png
│   │       ├── bmac.png
│   │       ├── github.png
│   │       └── ytb.png
│   ├── css
│   │   └── style.css
│   ├── js
│   │   ├── background.js
│   │   ├── browser-polyfill.js
│   │   ├── content.js
│   │   ├── options.js
│   │   ├── popup.js
│   │   └── vendor.js
│   ├── logo192.png
│   ├── logo512.png
│   ├── manifest.json
│   ├── options
│   │   └── options.html
│   └── popup.html
├── manifest
│   ├── beta-manifest-extra.json
│   ├── chrome-manifest-extra.json
│   ├── firefox-beta-manifest-extra.json
│   ├── firefox-manifest-extra.json
│   ├── manifest.json
│   └── safari-manifest-extra.json
├── package.json
├── package-lock.json
├── public
│   ├── assets
│   │   └── icons
│   │       ├── bmac2.png
│   │       ├── bmac.png
│   │       ├── github.png
│   │       └── ytb.png
│   ├── css
│   │   └── style.css
│   ├── logo192.png
│   ├── logo512.png
│   ├── options
│   │   └── options.html
│   └── popup.html
├── README.md
├── src
│   ├── background.ts
│   ├── components
│   │   ├── options
│   │   │   ├── Footer.tsx
│   │   │   └── Options.tsx
│   │   ├── popup
│   │   │   ├── Footer.tsx
│   │   │   └── Header.tsx
│   │   └── Popup.tsx
│   ├── content-script.ts
│   ├── css
│   │   └── index.css
│   ├── options.ts
│   ├── popup.ts
│   ├── react-app-env.d.ts
│   ├── redux
│   │   ├── Actions.ts
│   │   ├── ActionsTypes.ts
│   │   ├── reducers
│   │   │   ├── index.ts
│   │   │   └── MessageState.ts
│   │   └── store.ts
│   ├── render
│   │   ├── OptionsRenderer.tsx
│   │   └── PopupRenderer.tsx
│   ├── serviceWorker.ts
│   ├── types.ts
│   └── utils
│       └── utils.ts
├── tailwind.config.cjs
├── tsconfig.json
└── webpack
    ├── webpack.common.js
    ├── webpack.dev.js
    ├── webpack.manifest.cjs
    └── webpack.prod.js
cd my-app

Inside the newly created project, you can run some built-in commands:

npm "build:watch:firefox"

Runs the app in watch mode and open a .

Wait Firefox to load.

The addon will automatically reload if you make changes to the code. You will see the build errors and lint warnings in the console of the developpment tool section.

//GIF

npm test

No test implementation yet.

npm run build or yarn build

Builds the app for production to the dist folder. It correctly bundles React & Tailwinds in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

Your app is ready to be deployed.

What’s Included?

Your environment will have everything you need to build a modern single-page React app:

  • React, JSX, ES6, TypeScript, Eslint, Tailwind and Flow syntax support.

  • Language extras beyond ES6 like the object spread operator.

  • Autoprefixed CSS, so you don’t need -webkit- or other prefixes.

  • A build script to bundle manifest, JS, HTML Template for production, with hashes and sourcemaps.

  • A build script to bundle JS, CSS, and images for production, with hashes and sourcemaps.

Check out this guide for an overview of how these tools fit together.

The tradeoff is that these tools are preconfigured to work in a specific way. If your project needs more customization, you can "eject" and customize it, but then you will need to maintain this configuration.

Contributing

We'd love to have your helping hand on create-ts-react-extension! See CONTRIBUTING.md for more information on what we're looking for and how to get started.

Supporting Create React App

Create React App is a community maintained project and all contributors are volunteers. If you'd like to support the future development of Create React App then please consider donating to our Open Collective.

License

Create React App is open source software licensed as MIT. The Create React App logo is licensed under a Creative Commons Attribution 4.0 International license.