All Projects → jmahc → That React App You Want

jmahc / That React App You Want

Licence: mit
That react app you always wanted: [email protected], [email protected], postCSS, purifycss, dll's and code splitting examples, bregh. Highly opinionated but you better like it.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to That React App You Want

React Starter Kit
React, Redux, Webpack, Material UI, Boostrap 4, Code Splitting, HMR
Stars: ✭ 229 (+748.15%)
Mutual labels:  webpack, prettier, babel, code-splitting
Budgeting
Budgeting - React + Redux + Webpack (tree shaking) Sample App
Stars: ✭ 971 (+3496.3%)
Mutual labels:  webpack, tree-shaking, prettier, babel
Express React Boilerplate
🚀🚀🚀 This is a tool that helps programmers create Express & React projects easily base on react-cool-starter.
Stars: ✭ 32 (+18.52%)
Mutual labels:  webpack, prettier, babel, code-splitting
Webpack Core Usage
webpack2完整系列课程,欢迎阅读。同时欢迎移步我的react全家桶文章全集: https://github.com/liangklfangl/react-article-bucket
Stars: ✭ 94 (+248.15%)
Mutual labels:  webpack, tree-shaking, babel
Eleventy Webpack
A barebone Eleventy and Webpack boilerplate 🎈
Stars: ✭ 68 (+151.85%)
Mutual labels:  webpack, prettier, babel
Mostly
They mostly come at night; mostly.
Stars: ✭ 78 (+188.89%)
Mutual labels:  webpack, prettier, babel
React Boilerplate
Production-ready boilerplate for building universal web apps with React and Redux
Stars: ✭ 53 (+96.3%)
Mutual labels:  webpack, babel, code-splitting
Simple Boilerplate
A simple webpack boilerplate for your comfortable work with HTML, JS and CSS.
Stars: ✭ 116 (+329.63%)
Mutual labels:  webpack, prettier, babel
Lecture Frontend Dev Env
"[인프런] 프론트엔드 개발환경의 이해와 실습" 강의 실습 자료입니다.
Stars: ✭ 108 (+300%)
Mutual labels:  webpack, prettier, babel
Awesome Bundle Size
📝 An awesome list of tools and techniques to make your web bundle size smaller and your web apps load faster.
Stars: ✭ 118 (+337.04%)
Mutual labels:  webpack, tree-shaking, code-splitting
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (+511.11%)
Mutual labels:  webpack, babel, code-splitting
Mullet
Mullet Stack: Facebook in the front. Walmart in the back. (React, Hapijs, Node)
Stars: ✭ 194 (+618.52%)
Mutual labels:  webpack, prettier, babel
React Ssr Setup
React Starter Project with Webpack 4, Babel 7, TypeScript, CSS Modules, Server Side Rendering, i18n and some more niceties
Stars: ✭ 678 (+2411.11%)
Mutual labels:  webpack, prettier, babel
Vue Web Extension
🛠️ A Vue CLI 3+ preset (previously a Vue CLI 2 boilerplate) for quickly starting a web extension with Vue, Babel, ESLint and more!
Stars: ✭ 1,147 (+4148.15%)
Mutual labels:  webpack, prettier, babel
React Boilerplate
This project is deprecated. Please use CRA instead.
Stars: ✭ 88 (+225.93%)
Mutual labels:  webpack, prettier, babel
Starter React Flux
Generate your React PWA project with TypeScript or JavaScript
Stars: ✭ 65 (+140.74%)
Mutual labels:  webpack, prettier, babel
Serverless Webpack
Serverless plugin to bundle your lambdas with Webpack
Stars: ✭ 1,595 (+5807.41%)
Mutual labels:  webpack, webpack3, babel
Twreporter React
twreporter site with nodejs
Stars: ✭ 263 (+874.07%)
Mutual labels:  webpack, babel, code-splitting
Iceberg
Front-End Boilerplate built with React + Babel + Webpack + SASS
Stars: ✭ 144 (+433.33%)
Mutual labels:  webpack, webpack3, babel
Babel Webpack Tree Shaking
Tree-shaking example with Babel and Webpack
Stars: ✭ 254 (+840.74%)
Mutual labels:  webpack, tree-shaking, babel

that-react-app-you-want

Build Status Dependencies devDependencies Status

license All Contributors semantic-release

Watch on GitHub Star on GitHub Tweet

Yeah, this is it.

What you've all been waiting for: that react app boilerplate shit that you seek day and night.

Here it is.

Right here.

You can have it.

Now featuring [email protected].


Pick your poison

You even have options to decide what you want to use!


What do you want to see from this?

Please fill free to open a card, or shoot me an email (found in the package.json file) with tips, ideas and improvements!.

Hopefully you guys are enjoying it!


Getting started

What do you need? Linux/macOS or a Windows machine and yarn.

Linux & macOS Instructions

Steps for you yarn losers:

  1. yarn - Install the dependencies.
  2. yarn run dev-vendor - Required and allows for quicker development builds due to the DLL's generated.
  3. yarn run start or yarn run dev - start development server.
  4. yarn run build - build for production.

OPTIONAL

  • yarn run clean-all - Removes any production-built files, DLL files, installed dependencies and any lock files.
  • yarn run clean-dist - Removes any production-built files.
  • yarn run clean-dll - Removes any DLL files.
  • yarn run clean-yarn - Removes any yarn-specific files, including dependencies.

Windows Instructions

Steps for you yarn losers:

  1. yarn - Install the dependencies.
  2. yarn run dev:vendor - Required and allows for quicker development builds due to the DLL's generated.
  3. yarn run start or yarn run dev - Starts the development server.
  4. yarn run build:win - Builds the application for production.

OPTIONAL

  • yarn run clean:all - Removes any production-built files, DLL files, installed dependencies and any lock files.
  • yarn run clean:dist - Removes any production-built files.
  • yarn run clean:dll - Removes any DLL files.
  • yarn run clean:yarn - Removes any yarn-specific files, including dependencies.

That engine version shit for you semantic manics

This is what I use. Feel free to change .node-version, .nvmrc and the package.json file's engines to suit your needs.


What is inside, though?

Some really cool things:

  • webpack v3.10.0
  • prettier formatting
  • webpack but you can use ES6 syntax
  • chunks
  • jsx
  • Code-splitting aka importin' shit on the fly
  • Tree-shaking for money-makers
  • DLL's for faster build times
  • PostCSS
  • PurifyCSS
  • hot reloadin'
  • react
  • (optional) favicon generaton
  • (optional) preloading/prefetching
  • and last but not least: generact! Check that out, it's dope.
  • sample travis.yml file

Todos

  • Implement testing
  • Add an optional redux branch. in progress as of August 4, 2017
  • Add an optional react-router v4 branch.
  • Add an optional authentication process.

Issues

  • None as of now :)

Open Graph

Open Graph meta tags were added in the public/index.js file for your SEO needs. Customize them inside the html-webpack-plugin instance located in the config/webpack.config.commons.babel.js file, within the seo object!


Optional Functionality

These are optional decisions to made on your end, depending on the project required. I have chosen not to include them, as they vary from project-to-project.

Topics include:

  1. Preload and Prefetch
  2. Favicon and Mobile Icon Generation

Preload and Prefetch

Still looking to further optimize your web application's loading times? Preloading might be for you. Maybe you've seen <link rel="preload"> or <link rel="prefetch"> in a DOM's <head> before, maybe not. Because this project utilizes code-splitting to produce chunks, preloading and prefetching might be right up your alley! For this reason, I do have the plugin available in the webpack.config.production.babel.js file. You should notice it at the top of the plugin list.

Note: For more information, this Medium article can help distinguish your needs for preload or prefetch.

Side note: This example utilizes preload but the syntax should be the same for prefetch.

Here's what to do:

  1. yarn add --dev preload-webpack-plugin.
  2. Don't forget to import the plugin at the top of the config/webpack.config.production.babel.js file, if not already:
...
import PreloadWebpackPlugin from 'preload-webpack-plugin'
...
  1. In config/webpack.config.production.babel.js, you will want to place this first inside of the plugins array:
...
plugins: [
  new PreloadWebpackPlugin({
    rel: 'preload',
    as: 'script',
    include: 'asyncChunks'
  }),
]
...
  1. This will take any async chunks generated by webpack that the browser will then preload before everything else!
  2. If you have a feeling that the async chunks won't be used too soon after the page loads, then you may want to investigate a prefetch solution.
  3. Any other questions about the plugin can be referenced by visiting the preload-webpack-plugin repository.

Favicon and Mobile Icon Generation

These generate favicons for all devices (android, iOS, and the favicon itself) using a supplied image. Personally, I would be placed in the public directory. That's why you might see the my-image.png and favicon.ico in there. It's up to you which you choose to use.

  1. yarn add --dev favicons-webpack-plugin
  2. In config/webpack.config.commons.babel.js, you will want to comment/remove the favicons key:
...
plugins: [
  new HtmlWebpackPlugin({
    ...
    // favicon: PATHS.favicon
    ...
  })
]
...
  1. In config/webpack.config.production.babel.js, you will want to import the newly installed package at the top of the file:
...
import FaviconsWebpackPlugin from 'favicons-webpack-plugin'
...
  1. In the plugins section of the same production file, you will add this as one of the first plugins:
...
plugins: [
  new FaviconsWebpackPlugin({
    logo: PATHS.image,
    prefix: 'icons-[hash]/',
    emitStats: false,
    statsFilename: 'iconstats-[hash].json',
    persistentCache: true,
    inject: true,
    // (see https://github.com/haydenbleasel/favicons#usage)
    background: '#fff',
    title: 'that-react-app-you-want',
    icons: {
      android: true,
      appleIcon: true,
      appleStartup: true,
      coast: false,
      favicons: true,
      firefox: true,
      opengraph: true,
      twitter: true,
      yandex: false,
      windows: false
    }
  }),
  ...
]
...
  1. For reference, visit the [favicons-webpack-plugin page].

License

MIT


Contributors

Thanks goes to these wonderful people (emoji key):


Jordan McArdle

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!


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].