From 2e8bb7a27c672f1fa128df5ccf185da330e77292 Mon Sep 17 00:00:00 2001 From: kharann Date: Sun, 20 Sep 2020 20:08:37 +0200 Subject: [PATCH] add dynamic port-selection and postinstall action --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d6071b80..d54b40a3 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "scripts": { "dev": "next dev -p 8080", "build": "next build", - "start": "next start", + "start": "next start --port ${PORT:-3000}", "format": "prettier --write 'src/**/*.{ts,tsx,less}'", "format-check": "prettier --check 'src/**/*.{ts,tsx,less}'", "lint": "yarn lint-ts && yarn lint-less && yarn format", @@ -20,7 +20,8 @@ "lint-ts-check": "eslint 'src/**/*.{js,jsx,ts,tsx}'", "lint-less-check": "stylelint src/**/*.less", "test": "jest --env=jsdom", - "tsc": "tsc --noEmit" + "tsc": "tsc --noEmit", + "postinstall": "next build" }, "devDependencies": { "@babel/plugin-proposal-decorators": "^7.3.0",