项目作者: ivan-ruizrosello

项目描述 :
Configuration for React + NextJs SSR with Express, i18n, Jest, SASS and Robots.txt + Sitemap.xml
高级语言: JavaScript
项目地址: git://github.com/ivan-ruizrosello/next.js-boilerplate.git
创建时间: 2018-08-12T18:56:25Z
项目社区:https://github.com/ivan-ruizrosello/next.js-boilerplate

开源协议:

下载


NextJs Config

config set by Ivan Ruiz.

TODO

  • Express
  • Url prettifier
  • SASS
  • Page specific CSS Styling
  • Prop-Types
  • Normalize.css
  • Next/Link active routes
  • Translations (i18n)
  • Sitemap.xml
  • Robots.txt
  • Jest Testing :
    • ES6
    • Supertest
    • React Enzyme
    • Enzyme to Json
    • Allow css, sass and scss imports
    • Transform file imports

Dependencies

To install dependencies run the following command:

Yarn:

  1. yarn install

npm:

  1. npm i // npm install

Starting server

Production

To start the production server:

Yarn:

  1. yarn next:build
  2. yarn start
  1. npm run next:build
  2. npm start

Development

There’s a bug with nodemon + next, so we cant watch filest at “pages” directory, but its still better then nothing:

Yarn:

  1. yarn dev

npm:

  1. npm run dev

Testing

To start testing with Jest:

Yarn:

  1. yarn test

npm:

  1. npm run test