From e0a2d8682c99a8ae980a63d2054bb745c6edcfb8 Mon Sep 17 00:00:00 2001 From: Jayden Seric Date: Wed, 8 Nov 2017 14:49:17 +1100 Subject: [PATCH] New fix npm script, readme now prettier. --- app/package.json | 1 + app/readme.md | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/app/package.json b/app/package.json index c87811e..6e07ae2 100644 --- a/app/package.json +++ b/app/package.json @@ -33,6 +33,7 @@ }, "scripts": { "lint": "eslint .", + "fix": "npm run lint -- --fix && prettier --write readme.md", "dev": "dotenv next", "build": "dotenv next build", "start": "dotenv next start" diff --git a/app/readme.md b/app/readme.md index 5f99fe6..689bd05 100644 --- a/app/readme.md +++ b/app/readme.md @@ -4,22 +4,27 @@ An example SSR web app using: -- [next](https://www.npmjs.com/package/next) -- [react-apollo](https://www.npmjs.com/package/react-apollo) -- [apollo-link-batch-http](https://www.npmjs.com/package/apollo-link-batch-http) -- [apollo-fetch-upload](https://www.npmjs.com/package/apollo-fetch-upload) +* [next](https://www.npmjs.com/package/next) +* [react-apollo](https://www.npmjs.com/package/react-apollo) +* [apollo-link-batch-http](https://www.npmjs.com/package/apollo-link-batch-http) +* [apollo-fetch-upload](https://www.npmjs.com/package/apollo-fetch-upload) ## Setup -1. Install the latest [Node.js](https://nodejs.org) and [npm](https://npmjs.com). +1. Install the latest [Node.js](https://nodejs.org) and + [npm](https://npmjs.com). 2. Duplicate `.env.example` as `.env` and customize. 3. With Terminal in the `api` directory run `npm install`. -4. Run `npm run dev` for development, or `npm run build && npm start` for production. +4. Run `npm run dev` for development, or `npm run build && npm start` for + production. Ensure your editor supports: -- [EditorConfig](http://editorconfig.org). -- [ESLint](http://eslint.org), respecting `package.json` config. [Atom](https://atom.io) users install [`linter-eslint`](https://atom.io/packages/linter-eslint) and enable `Fix errors on save`. +* [EditorConfig](http://editorconfig.org). +* [ESLint](http://eslint.org), respecting `package.json` config. + [Atom](https://atom.io) users install + [`linter-eslint`](https://atom.io/packages/linter-eslint) and enable `Fix + errors on save`. ## Support