项目作者: codejunkienick

项目描述 :
Cutting edge starter kit
高级语言: JavaScript
项目地址: git://github.com/codejunkienick/starter-lapis.git
创建时间: 2016-08-09T05:22:18Z
项目社区:https://github.com/codejunkienick/starter-lapis

开源协议:

下载


Demo on Heroku

LAPIS

Cutting edge starter kit optimized for development and production using latest tools available.
It features optimized for rapid development config powered by happypack and various settings I’ve found to be optimal.

Features

Structure

  • client.js entry point for client rendering
  • server.js entry point for server rendering.
  • Html.js boilerplate html for clientside rendering and serverside rendering.
  • data folder is for anything related to handling api requests. index.js exports functions that return api calls wrapped in Promises. Right now axios is used for api client.
  • config folder is for configuration of client app.
  • screens folder is for routes. I use structure proposed by ryanflorence with some modifications and it works great with react-router@v4 declarative structure.
  • redux do i need to explain that to you?
  • css any css classes that is shared among components and can be used through CSSModules syntax (e.g. composes: a from ‘css/helpers.css’)
  1. app
  2. ├── client.js
  3. ├── server.js
  4. ├── constants.js
  5. ├── ServerTemplate.js
  6. ├── ClientTemplate.js
  7. ├── Html.js
  8. ├── config
  9. ├── routes.js
  10. └── index.js
  11. ├── screens
  12. └── App
  13. ├── components
  14. ├── screens
  15. ├── Admin
  16. ├── components
  17. ├── screens
  18. ├── Reports
  19. ├── components
  20. └── index.js
  21. └── Users
  22. ├── index.js
  23. └── styles.css
  24. ├── index.js
  25. └── index.css
  26. └── Course
  27. ├── screens
  28. └── Assignments
  29. └── index.js
  30. └── index.js
  31. └── index.js
  32. ├── core
  33. ├── utils
  34. └── validation.js
  35. ├── atoms
  36. ├── Link
  37. └── Icon
  38. ├── molecules
  39. └── IconLink
  40. └── organisms
  41. └── Header
  42. ├── redux
  43. ├── createStore.js
  44. ├── actions
  45. ├── user.js
  46. └── reports.js
  47. ├── reducers
  48. ├── user.js
  49. └── reports.js
  50. └── sagas
  51. ├── user.js
  52. └── reports.js
  53. ├── data
  54. ├── apiClient.js
  55. ├── user.js
  56. └── index.js
  57. └── css
  58. ├── global.css
  59. ├── variables.css
  60. └── helpers.css

TODO

  • Code splitting with System.import()
  • Write test examples

How to?

How to enable/disable SSR

Check bin/server.js executable and change DISABLE_SSR variable.

Installation

  1. yarn

Running Dev Server

  1. npm run dev-dll // Build libraries for faster webpack build
  2. npm run dev

or with webpack-dashboard

  1. npm run dev-dll // Build libraries for faster webpack build
  2. npm run dev-dash

Building and Running Production Server

  1. npm run build
  2. npm run start

Thanks

Thanks to erikas for providing starting ground for my react learning.
This starter resembles some code and a bit of structure from now outdated erikas’s starter kit