• Stars
    star
    483
  • Rank 91,050 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

CrossBuilder

Build Status Build status Windows bitHound Score Dependency Status devDependency Status

Building web, Electron, Cordova and Chrome apps, and cross-browser extensions that use Redux actions for messaging.

Redux states are synced between background, injected 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.

Structure

  • src/app: React cross-browser application (will be imported in the apps bellow).
  • src/web: web app sources.
  • src/browser: extensions sources.
  • src/chromeApp: Chrome app sources
  • src/electron: Electron app sources
  • test/app: tests for Redux actions and reducers, and for React components (using enzyme).
  • test/chrome: tests for Chrome app and extension (using chromedriver, selenium-webdriver).

CrossBuilder included libraries

Installation

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

Development

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

React/Flux hot reload

This boilerplate uses Webpack and react-transform. You can hot reload by editing related files of ./src/app. If the inject page for the extension 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.

Debug with Redux DevTools

We use Redux DevTools Extension, install it from Chrome store for debugging.

Build web app

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

Build Electron app

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

# or to start it
npm run start:electron

Build Chrome app

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

Build Chrome extension

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

Build Firefox extension

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

Note that you should use Firefox Nightly or Developer Edition to support WebExtensions. 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 or use Firefox Developer Edition which can load local directories. Make sure yo follow prerequisites and installing instruction.

Build & Run Cordova app

  1. Install global tools: npm install -g cordova.
  2. Add your cordova platform by running cordova platform add %PLATFORM% (where %PLATFORM% is the platform you deploy for: android and more).
  3. Use cordova run android or cordova build android to run or build the app (it will execute npm run build:cordova automatically as a hook).

Build & Compress

# build and compress Electron app to [name].dmg, win32-ia32.zip, win32-x64.zip, linux-ia32.zip, linux-x64.zip
npm run compress:electron

# compress Chrome app to app.zip
npm run compress:app

# compress Chrome extension to extension.zip
npm run compress:extension

# compress Firefox extension 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

More Repositories

1

redux-devtools-extension

Redux DevTools extension.
JavaScript
13,500
star
2

remote-redux-devtools

Redux DevTools remotely.
JavaScript
1,804
star
3

mobx-remotedev

MobX DevTools extension
JavaScript
327
star
4

redux-remotedev

Redux DevTools for production (web and React Native) with a highly flexible API.
JavaScript
267
star
5

remotedev-server

Connect Redux DevTools extension to a remote app.
JavaScript
183
star
6

remotedev-app

Remote Redux DevTools monitor app.
JavaScript
158
star
7

remotedev

Remote debugging for any flux architecture.
JavaScript
143
star
8

atom-redux-devtools

Redux DevTools Atom package
CoffeeScript
140
star
9

redux-devtools-filter-actions

Redux DevTools composable monitor with the ability to filter actions.
JavaScript
77
star
10

social-expert

Master your GitHub notifications by priority and weight.
JavaScript
59
star
11

redux-devtools-instrument

Redux DevTools instrumentation. Moved to redux-devtools monorepo.
JavaScript
41
star
12

remotedev-serialize

Serialize "unserializable" data and parse it back.
JavaScript
25
star
13

redux-notify

Notify when specified redux actions are dispatched.
JavaScript
17
star
14

devui

Reusable React components for building Redux Devtools monitors.
JavaScript
16
star
15

redux-devtools-test-generator

Generate tests right in Redux DevTools.
JavaScript
14
star
16

momentjs-datetimepicker

jQuery Date and Time Picker using Momentjs format and translations.
JavaScript
14
star
17

browser-redux-sync

Keep redux states in sync for browser extensions and apps.
JavaScript
13
star
18

react-chat

WIP
JavaScript
12
star
19

react-switcher

Stateless React switcher component to toggle container states.
JavaScript
7
star
20

crossmessaging

Crossextension messaging.
JavaScript
6
star
21

chrome-storage-local

Use the same api for chrome.storage.local as for localStorage.
JavaScript
5
star
22

horizon-remotedev

Horizon DevTools extension.
JavaScript
4
star
23

browser-redux-bg

Messaging library for Cross-browser extensions and Chrome apps.
JavaScript
3
star
24

remotedev-utils

Moved to https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-core
JavaScript
2
star
25

zalmoxisus.github.io

HTML
2
star
26

boilerplate

JavaScript
1
star
27

remotedev-slider

Redux DevTools Slider monitor with remote reports
JavaScript
1
star