next.js stuff that comes in handy

As I use next more and more, I tend to replicate a few patterns when starting a new app from scratch. I’m leaving this here for documenting my best practices while using next as a framework.

Add a few scripts to package.json

"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"deploy": "now && now alias",
"lint": "eslint ."
"now": {
 "alias": ""

Get an .eslintrc  file


$ wget


The dependencies

$ npm install --save react react-dom next isomorphic-fetch
$ npm install --save-dev eslint babel-eslint eslint-plugin-react

Create some dirs

$ mkdir pages components lib static && touch pages/index.js && touch static/styles.css

Some commands

$ npm run dev
$ npm run deploy