2.15.1 • Published 5 years ago

frack-core v2.15.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Front-end Dev Stack Version Downloads Build Status Unix Build Status Windows Dependencies

A Universal React Stack, semi-automatic route-based code splitting, Hot Module Reloading (HMR), Redux, Apollo GraphQL and more...

TOC

Key Benefits

  • No Boilerplate. Just another dependency to include. Easy future updates & maintenance.
  • Route based Code Splitting with Hot Module Reloading (HMR).

More on the selected components of the stack: About

Features

  • Universal / Isomorphic application development.
  • Extreme live development - hot reloading of client/server source with high level of error tolerance.
  • Express server with a basic security configuration using hpp and helmet.
  • ReactJS as the view layer.
  • React Router v4 as the router.
  • React Helmet allowing control of the page title/meta/styles/scripts from within your components. Direct control for your SEO needs.
  • (S)CSS Support with CSS modules and additional flexible full PostCSS chain for advanced transformations e.g. autoprefixer
  • Fully integrated asset support for referencing files in CSS and JavaScript.
  • Full ES2015 support, using Babel to transpile where needed.
  • Bundling of both client and server using Webpack v2. See also: The Cost of Small Modules
  • Client bundle is automatically split by routes.
  • Long term caching of the client bundle works out of the box.
  • Support for development and optimized production configuration.
  • Easy environment configuration via dotenv files.
  • Markdown rendering for Components integrated.
  • Super modular Lodash with Webpack tooling to enable automatic tree shaking
  • Fetch API Polyfill integrated
  • PostCSS Lost Grid integrated
  • Redux and Thunk middleware
  • Apollo Client (GraphQL)
  • Data Loading on Server Side using fetchData static methods where available
  • HardSource pre-configured for unseen rebuild performance.

Overview

This solution uses Webpack 2 to produce bundles for both the client and the server code.

The reasoning for using Webpack to bundle both the client and the server is to bring greater interop and extensibility to the table. This will for instance allowing server bundles to handle React components that introduce things like CSS or Images (as and when you add the respective loaders).

Given that we are bundling our server code I have included the source-map-support module to ensure that we get nice stack traces when executing our code via node.

All the source code is written in ES2015, and I have explicitly kept it to the true specification (bar JSX syntax). As we are following this approach it is unnecessary for us to transpile our source code for the server into ES5, as node v6 has native support for almost all of the ES2015 syntax. Our client (browser) bundle is however transpiled to ES5 code for maximum browser/device support.

The application configuration is supported by the dotenv module and it requires you to create a .env file in the project root (you can use the .env.example as a base). The .env file has been explicitly ignored from git as it will typically contain environment sensitive/specific information. In the usual case your continuous deployment tool of choice should configure the specific .env file that is needed for a target environment.

Prerequisites

Front-end Dev Stack includes a few NodeJS dependencies which rely on native code and requires binary downloads (where possible) or local compilation of source code. This is implemented in NodeJS via Node-Gyp.

Currently the following dependencies are using native code:

  • leveldown: Used by HardSource for caching
  • compression: ExpressJS compression library
  • iltorb: Brotli compression

Mac OS

  1. Install XCode from the Mac App Store
  2. Install Homebrew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. Install NodeJS v6 or higher using Homebrew (brew install node)
  4. Install Yarn using Homebrew (brew install yarn)

Linux

  1. Install Python 2.7 or higher (but small than 3.x)
  2. Install proper C/C++ compiler toolchain, like gcc, make, etc.
  3. Install NodeJS
  4. Install Yarn

Windows

  1. Install Python 2.7 or higher (but small than 3.x)
  2. Install Windows Build Tools or Visual Studio
  3. Install NodeJS v6 or higher
  4. Install Yarn (using MSI installer)
  5. For some friendlier terminal you might want to use the Ubuntu shell in Windows 10 or Hyper.app

Note: Without admin rights it's best to download NodeJS locally in some accessible folder and extend the PATH using setx to the NodeJS folder. Installation of Yarn seems to work best for this situation when using npm install yarn instead of using the MSI installer.

Note: Windows Build Tools are required for Node-Gyp support: Easiest approach would be installation via npm install --global --production windows-build-tools - alternatively install Visual Studio 2013 or 2015 (be sure to select "Common Tools for Visual C++"). Also have a look here: https://github.com/nodejs/node-gyp#installation

Note: Eventually you have to configure your proxy settings for NPM before any following installation procedures.

License

2.15.1

5 years ago

2.15.0

5 years ago

2.14.0

5 years ago

2.13.2-0

5 years ago

2.13.2

5 years ago

2.13.1

5 years ago

2.12.0

6 years ago

2.11.2

6 years ago

2.11.1

6 years ago

2.11.0

6 years ago

2.10.1

6 years ago

2.10.0

6 years ago

2.9.11

6 years ago

2.9.10

6 years ago

2.9.9

6 years ago

2.9.8

6 years ago

2.9.7

6 years ago

2.9.6

6 years ago

2.9.5

6 years ago

2.9.4

6 years ago

2.9.3

6 years ago

2.9.2

6 years ago

2.9.1

6 years ago

2.9.0-beta.5

6 years ago

2.9.0-beta.4

6 years ago

2.9.0-beta.3

6 years ago

2.9.0-beta.2

6 years ago

2.9.0-beta.1

6 years ago

2.8.1

6 years ago

2.8.0

6 years ago

2.7.6

6 years ago

2.7.5

6 years ago

2.7.4

7 years ago

2.7.3

7 years ago

2.7.3-1

7 years ago

2.7.3-0

7 years ago

2.7.2

7 years ago

2.7.1

7 years ago

2.7.0

7 years ago

2.6.1

7 years ago

2.6.0

7 years ago

2.5.0

7 years ago

2.4.0

7 years ago

2.3.18

7 years ago

2.3.17

7 years ago

2.3.16

7 years ago

2.3.15

7 years ago

2.3.14

7 years ago

2.3.13

7 years ago

2.3.12

7 years ago

2.3.11

7 years ago

2.3.10

7 years ago

2.3.9

7 years ago

2.3.8

7 years ago

2.3.7

7 years ago

2.3.6

7 years ago

2.3.5

7 years ago

2.3.4

7 years ago

2.3.3

7 years ago

2.3.2

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.19

7 years ago

2.1.18

7 years ago

2.1.17

7 years ago

2.1.16

7 years ago

2.1.15

7 years ago

2.1.14

7 years ago

2.1.13

7 years ago

2.1.12

7 years ago

2.1.11

7 years ago

2.1.10

7 years ago

2.1.9

7 years ago

2.1.8

7 years ago

2.1.7

7 years ago

2.1.6

7 years ago

2.1.5

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.1.0-4

7 years ago

2.1.0-3

7 years ago

2.1.0-2

7 years ago

2.1.0-1

7 years ago

2.1.0-0

7 years ago

2.0.0-1

7 years ago

2.0.0-0

7 years ago

1.0.0-27

7 years ago

1.0.0-26

7 years ago

1.0.0-24

7 years ago

1.0.0-23

7 years ago

1.0.0-22

7 years ago

1.0.0-21

7 years ago

1.0.0-20

7 years ago

1.0.0-19

7 years ago

1.0.0-17

7 years ago

1.0.0-15

7 years ago

1.0.0-14

7 years ago

1.0.0-13

7 years ago

1.0.0-12

7 years ago

1.0.0-11

7 years ago

1.0.0-10

7 years ago

1.0.0-9

7 years ago

1.0.0-8

7 years ago

1.0.0-7

7 years ago

1.0.0-6

7 years ago

1.0.0-4

7 years ago

1.0.0-3

7 years ago

1.0.0-2

7 years ago

1.0.0-1

7 years ago

0.3.0

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago