Skip to content

Building web, Electron, Cordova and Chrome apps, and cross-browser extensions with React, Redux and Webpack. "Write once, deploy everywhere" concept in practice.

License

Notifications You must be signed in to change notification settings

songchao168/crossbuilder

Repository files navigation

Browser App and Extension Boilerplate using Redux Actions

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.

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 & 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

Load to Chrome

Roadmap

LICENSE

MIT

About

Building web, Electron, Cordova and Chrome apps, and cross-browser extensions with React, Redux and Webpack. "Write once, deploy everywhere" concept in practice.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.1%
  • HTML 2.9%