Skip to content

A ready-to-use NodeJS project starter with development and production build options

Notifications You must be signed in to change notification settings

chknim/simple-react-gulp-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

simple-react-gulp-webpack

The goal is to have yet another template with these features

  • Bundle all source codes and libraries into a statically deployable output
  • Two easy triggerable options for development mode or production mode

Usage

  • Run npm start

Development History

Initialize package.json

- npm init

Add Express

- npm install express --save

Add Webpack and Babel modules as developer dependencies

- npm install webpack --save-dev - npm install babel-core --save-dev // required by babel-loader - npm install babel-loader --save-dev // required by webpack - npm install babel-preset-react --save-dev // for babel to interpret JSX - npm install babel-preset-es2015 --save-dev // for babel to transpile ES6 to ES5

Add React modules as application dependencies

- npm install react react-dom --save

Add Hot Reloading modules as developer dependencies

- npm install webpack-dev-middleware webpack-hot-middleware babel-plugin-react-transform react-transform-hmr --save-dev

Add React try/catch module

- npm install react-transform-catch-errors redbox-react --save-dev

Gulp Commands

  • gulp what - shows all the options.
  • gulp build - build development version into build folder
  • gulp run - start node server for development environment
  • gulp build-prod - build production version into production folder
  • gulp run-prod - start node server for production environment
  • gulp run-prod-static - start a simple http server to serve the production build statically

About

A ready-to-use NodeJS project starter with development and production build options

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published