ReactJS Next.js Isomorphic replace cp CodeIgniter Frontend

Setup

  • Install nvm
  • Target node 6.6.0
    • nvm install 6.6.0
    • nvm use 6.6.0
  • yarn install
  • yarn run dev to start application in development environment

Testing

get-help-fe uses Jest + Enzyme for component testing.

  • yarn run test will run all tests
  • yarn run test:watch will watch/run tests when changes are made
  • yarn run coverage will produce code coverage reports
    • An HTML file located at coverage/icov-report/index.html contains a clean code coverage report

Directory Structure

  • _tests_/ – Jest/Enzyme unit tests
  • actions/ – Redux Actions
  • components/ – Reusable React components
  • config/ – Keystone pipeline configuration
  • coverage/ – Code coverage report output directory
  • dist/ – Bundled code used for code-splitting and production builds
  • layouts/ – Higher-order React components that wrap pages, aka: layouts, themes, templates
  • pages/ – Single instance React components implemented as pages
  • pipelines/ – node-pipeline specific build pipeline configuration
  • reducers/ – Redux reducers
  • static/ – Directory used to host static assets for serving without pre-processing (images, fonts, etc)
  • .babelrc – Configuration file for Babel – transpiles ES6 to better supported ECMA2015 for end users
  • .eslintrc – Configuration file for ESLint
  • api.js – API endpoint definitions
  • application.yaml – Keystone build pipeline configuration
  • next.config.js – Next.js configuration file
  • package.json – Application dependencies
  • pm2.json – PM2 Application Monitoring
  • redirects.js – Legacy URL path redirects
  • routes.js – Application routes
  • server.js – Application server
  • yarn.lock – Yarn lock file — Do not edit, always commit!

Leave a Reply

You must be logged in to post a comment.