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

browser-redux

v0.4.0

Published

Building Chrome apps and cross-browser extensions with Redux and Webpack.

Downloads

6

Readme

Browser App and Extension Boilerplate using Redux Actions

Build Status bitHound Score Dependency Status devDependency Status

Simple boilerplate and library for building Chrome apps and cross-browser extensions (support for Firefox and Safari will come later) that use Redux actions instead of messaging.

Demo

Redux states are synced between background, inject page, app window, extension popup and badge.

The developing is the same as for the web apps with React and Redux, just use the src/app boilerplate. If you need some extension or Chrome app customizations, use src/browser/ boilerplates.

The app example is edited from Redux Counter example using Redux Persist, based on React Chrome Extension Boilerplate.

Structure

  • browser-redux-sync: states syncing module.
  • browser-redux-bg: messaging module - send redux actions (from popup, windows or inject pages) to be called in the background by their function name.
  • src/app: React cross-browser application.
  • src/browser: sources for the extension and Chrome app.
  • test/app: tests for Redux actions and reducers, and for React components (using Legit Tests).
  • test/chrome: tests for Chrome app and extension (using chromedriver, selenium-webdriver).

Included

Installation

# required node.js/io.js
# clone it
npm install

Development

# build files to './dev'
# watch files change
# start WebpackDevServer
npm run dev

You can load unpacked extensions with ./dev.

React/Flux hot reload

This boilerplate uses Webpack and react-transform, and use Redux. You can hot reload by editing related files of Popup & Window. If the inject page is on https (like https://github.com), click the 'shield' icon on the Chrome address bar to allow loading http://localhost there (after making any changes in dev mode), so hot reload can work for that page.

Build extension

# build files to './build/extension'
npm run build:extension

Build app

# build files to './build/app'
npm run build:app

Build firefox extension

# build files to './build/firefox'
npm run build:firefox

Note that it's not possible for now to load Firefox extensions from local directories, so use npm run compress:firefox instead to generate an xpi file.

Build & Compress ZIP file

# compress extension's build folder to extension.zip
npm run compress:extension

# compress app's build folder to app.zip
npm run compress:app

# compress firefox extension's build folder to firefox.xpi
npm run compress:firefox

Load

Test

# test app
npm run test:app

# start Chromedriver for testing with Chrome
npm run before:test:chrome

# test Chrome extension
npm run test:chrome:extension

# test Chrome app
npm run test:chrome:app

# test Chrome extension and app
npm run test:chrome

# test everything
npm test

Roadmap

LICENSE

MIT