All Projects → unimonkiez → React Cordova Boilerplate

unimonkiez / React Cordova Boilerplate

Licence: mit
TodoMVC example for react with development tools to build a cordova application

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Cordova Boilerplate

Iceberg
Front-End Boilerplate built with React + Babel + Webpack + SASS
Stars: ✭ 144 (-30.1%)
Mutual labels:  webpack, webpack2, boilerplate, sass
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (-19.9%)
Mutual labels:  webpack, boilerplate, karma, sass
Frontie Webpack
Front-end Boilerplate | Gulp 4 + Webpack 4 + Babel + ITCSS Architecture + BEM Methodology + Twig.js
Stars: ✭ 102 (-50.49%)
Mutual labels:  webpack, boilerplate, sass
Es6 Webpack2 Starter
🚀 A template project for es6/7, webpack2/3, sass and postcss
Stars: ✭ 106 (-48.54%)
Mutual labels:  webpack, webpack2, sass
Angularjs Webpack Starter
🚀 A modern frontend setup for AngularJS projects using NPM, TypeScript and Webpack.
Stars: ✭ 173 (-16.02%)
Mutual labels:  webpack, karma, jasmine
Egeo
EGEO is the open-source UI library used to build Stratio's UI. It includes UI Components, Utilities, Services and much more to build user interfaces quickly and with ease. The library is distributed in AoT mode.
Stars: ✭ 69 (-66.5%)
Mutual labels:  karma, jasmine, sass
Semaphore Ng2 Webpack
Stars: ✭ 81 (-60.68%)
Mutual labels:  webpack, karma, jasmine
Webpack Starter
✨ A lightweight foundation for your next webpack based frontend project.
Stars: ✭ 1,745 (+747.09%)
Mutual labels:  webpack, boilerplate, sass
Tris Webpack Boilerplate
A Webpack boilerplate for static websites that has all the necessary modern tools and optimizations built-in. Score a perfect 10/10 on performance.
Stars: ✭ 1,016 (+393.2%)
Mutual labels:  webpack, boilerplate, sass
Kirby Webpack
💪 A Kirby CMS starter-kit with modern frontend tools
Stars: ✭ 150 (-27.18%)
Mutual labels:  webpack, boilerplate, sass
React Redux Styled Hot Universal
react boilerplate used best practices and focus on performance
Stars: ✭ 147 (-28.64%)
Mutual labels:  webpack, webpack2, boilerplate
Docker Django Webpack Skeleton
Django Skeleton W/ Docker Dev & Production W/ Webpack 2 W/ BabelJS W/ Sass W/ PostgreSQL
Stars: ✭ 191 (-7.28%)
Mutual labels:  webpack, webpack2, sass
App Template
Boilerplate for Angular apps
Stars: ✭ 67 (-67.48%)
Mutual labels:  webpack, boilerplate, karma
React Redux Typescript Boilerplate
A bare minimum frontend boilerplate with React 16, Typescript 3 and Webpack 4
Stars: ✭ 1,100 (+433.98%)
Mutual labels:  webpack, boilerplate, todomvc
Cookiecutter Webpack
Boilerplate for webpack 2, babel, react + redux + hmr, and karma. Can be inserted into existing django projects.
Stars: ✭ 87 (-57.77%)
Mutual labels:  webpack, webpack2, karma
Webxr Webpack Boilerplate
Starter Kit for building rich, immersive WebXR projects (featuring A-Frame) PWA with Webpack and SASS
Stars: ✭ 48 (-76.7%)
Mutual labels:  webpack, boilerplate, sass
Static Site Boilerplate
A better workflow for building modern static websites.
Stars: ✭ 1,633 (+692.72%)
Mutual labels:  webpack, boilerplate, sass
Budgeting
Budgeting - React + Redux + Webpack (tree shaking) Sample App
Stars: ✭ 971 (+371.36%)
Mutual labels:  webpack, webpack2, sass
Html Sass Babel Webpack Boilerplate
Webpack 4 + Babel + ES6 + SASS + HTML Modules + Livereload
Stars: ✭ 35 (-83.01%)
Mutual labels:  webpack, boilerplate, sass
Pychat
webchat via WebSockets/WebRTC that allows messaging/video call/screen sharing
Stars: ✭ 152 (-26.21%)
Mutual labels:  webpack, cordova, sass

Build Status Dependency Status devDependency Status npm version

React Cordova boilerplate

Demo - click the image to try it

Why cordova and React

Cordova is really simple to build cross platform mobile applications for any of your needs, this boilerplate provides a great starting point for your next react project, and can be used to maintain a website and mobile application from same source code (and maybe transitioning later to react-native).
I highly advise to check out my other boilerplate, which is similar in many ways but produces a native app.

Features

  • eslint
  • Smart build using Webpack 2
    • ES6
    • React (jsx)
    • Server rendering for initial page
    • Style: Radium + SASS
  • React router
  • Testing
    • Mocha
    • jsdom (blazing fast testing on nodeJs)
    • Sinon
    • Chai
    • Coverage using nyc

Installing

  1. Install dependencies: npm i or yarn install
  2. Install global tools: npm install -g cordova
  3. Add your cordova platform by running cordova platform add %PLATFORM% (android and more)

Usage

  • npm run lint[:report] - runs linting against src folder and fix some of the issues, report option to generate html report to ./report.html.
  • npm run start[:prod] - starts a server, with react model replacement and devtools on localhost:8080, prod option to minify the build (same build eventually integrated with the cordova app).
  • npm run build[:prod][:watch] - builds the project (single html file and single js file) as it does for development.
  • npm run test[:watch][:coverage] - runs Mocha testing, outputs result to console, watch options to watch files and test again after file modification, coverage option to generate coverage reports to ./coverage folder (index.html is a usuful one!).

Build and run as application

As you do with any cordova application, cordova build android, cordova run android and more.

cordova runs npm run build:prod before any cordova command (using hooks).

Style practice

To style your html, simply inline style your DOM (here is why).

You can use Radium (which is included) to easily add 'css like' event listeners to your components (like hover).

Sass/CSS is included to complete some of the missing features or already written style you want to use. To use Sass/CSS simply import that file!

custom-font.scss

@font-face {
	font-family: 'custom-font';
	src:url('./custom-font.eot') format('embedded-opentype'),
		url('./custom-font.ttf') format('truetype'),
		url('./custom-font.woff') format('woff'),
		url('./custom-font.svg') format('svg');
	font-weight: normal;
	font-style: normal;
}
.customFont {
  font-family: 'custom-font';  
  &.customFontIcon {
    content: "\e600";
    &:hover {
      color: blue;
    }
  }
}

ExampleComponent.jsx

import React, { Component } from 'react';
import customFont from './custom-font.scss'

export default class ExampleComponent extends Component {
  render() {
    return (
      <div style={{backgroundColor: 'red'}}>
        Hello world!
        <span className={customFont.customFont + ' ' + customFont.customFontIcon}></span>
      </div>
      );
  }
}

Advantages:

  • Complete styling ability to go with inline style.
  • Easily use third party styles.
  • No globals - import style files and use the class (minifies signature - example .a instead of .customFont)

Sass style will be minified, bundled and included to the server rendered file.

Troubleshooting

  • Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js X.x If you get an error like this means you previously installed Node SASS in an older version of Node which no longer applies to you. To fix run npm rebuild node-sass
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].