Giter Site home page Giter Site logo

hahoocn / react-mobile-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 5.0 380 KB

A simple boilerplate for build mobile web app ( Node.js, React.js, Redux, immutable-js, Webpack, CSS Modules, PostCSS, Babel, ES2015, ESLint, Server side and client side rendering ... )

License: MIT License

JavaScript 94.90% HTML 2.56% CSS 2.54%
redux react babel eslint boilerplate postcss css-modules es6 server-side-rendering client-side-rendering

react-mobile-boilerplate's Introduction

react-mobile-boilerplate

A simple boilerplate for build mobile web app. Server side and client side rendering support.

webpack4, react-hot-loader4, react-router5

Installation

You'll need to have Node.js to get started.

$ git clone https://github.com/hahoocn/react-mobile-boilerplate.git
$ npm install

Running Dev Server (Development)

$ npm run dev

Building and Running Production Server

$ npm run build
$ npm run start

Only build the client side

$ npm run build:client

Clean Build Folder

$ npm run clean

Tech Stacks

React

Redux

  • Redux (A predictable state container for JavaScript apps.)
  • redux-act-reducer (A lib to create actions and reducers for Redux)
  • Redux Thunk (Thunk middleware for Redux.)
  • Redux DevTools Extension (A chrome extension for redux)
  • hahoorequest (A HTTP request abstract library, use other http request libraries in one way. Isomorphic request to work in Node or in the browser.)
  • reselect (Simple selector library for Redux)
  • redux-immutable (redux-immutable is used to create an equivalent function of Redux combineReducers that works with Immutable.js state.)

immutable

  • immutable-js (Immutable persistent data collections for Javascript which increase efficiency and simplicity.)

Webpack

  • Webpack (A module bundler.)
  • Webpack Loaders
  • Webpack Plugins
  • Style & CSS
    • CSS Modules (A CSS Module is a CSS file in which all class names and animation names are scoped locally by default.)
    • PostCSS (PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more.)
    • Autoprefixer (PostCSS plugin to parse CSS and add vendor prefixes to CSS rules using values from Can I Use. It is recommended by Google and used in Twitter, and Taobao.)
    • PostCSS Nested (PostCSS plugin to unwrap nested rules like how Sass does it.)
    • PostCSS Mixins (PostCSS plugin for mixins.)
    • PostCSS Simple Variables (PostCSS plugin for Sass-like variables.)
    • svgo (SVG Optimizer is a Nodejs-based tool for optimizing SVG vector graphics files.) svgo is bundled with svgo-loader

Babel

  • babel (Babel is a generic multi-purpose compiler for JavaScript. Using Babel you can use the next generation of JavaScript, as well as the next generation of JavaScript tooling.)
  • @babel/preset-react (Strip flow types and transform JSX into createElement calls.)
  • @babel/preset-env (a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, browser polyfills) are needed by your target environment(s).)
  • .babelrc (Babel config file)
  • babel-eslint (ESLint using Babel as the parser.)
  • babel-loader (Transpiling JavaScript files using Babel and webpack.)
  • babel-polyfill (This will emulate a full ES2015 environment and is intended to be used in an application rather than a library/tool.)

ESLint

Stylelint

  • stylelint (A mighty, modern CSS linter that helps you enforce consistent conventions and avoid errors in your stylesheets.)

Express

  • Express (Fast, unopinionated, minimalist web framework for node.)
  • Express Handlebars (A Handlebars view engine for Express which doesn't suck.)

EditorConfig

  • EditorConfig (EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.)

react-mobile-boilerplate's People

Contributors

ihahoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-mobile-boilerplate's Issues

你好,我用了JMUI框架,类名样式没办法应用上

直接 import { Button } from 'jmui'; ,样式发现是标签样式 都应用上了 但是以类名开始的样式都没应用上
aaa,我想问一下这个怎么解决,我发现 只要不是 const Style = require('./index.css'); 以

明明的样式 都打包不进 webpack-assets.json这个文件

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.