Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

chore: clean up npm scripts #1249

Merged
merged 2 commits into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ tsconfig.tsbuildinfo
./deploy*
*.tar.gz
*.xml
public/*
public/*
Makefile
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ init:
dep:
npm install # for commitizen

# shortcut for serve.local
dev: before_action
@$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.local.json > /tmp/config.json
@$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.dev.json > /tmp/config.json
@cp /tmp/config.json ./config/config.json
npm run local
npm run dev

build:
npm build
Expand All @@ -46,8 +45,6 @@ serve.help:
serve:
$(call serve.help)
@echo "\n"
serve.local:
npm run local
serve.dev:
npm run serve.dev
serve.prod:
Expand Down
3 changes: 2 additions & 1 deletion config/config.dev.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"//--- endpoint configs ---//": "",
"GRAPHQL_ENDPOINT": "https://devapi.coderplanets.com/graphiql"
"GRAPHQL_ENDPOINT": "http://localhost:4001/graphiql",
"// GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql"
}
2 changes: 1 addition & 1 deletion config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"//--- contact configs ---//": "",
"EMAIL_SUPPORT": "coderplanets@outlook.com",
"// GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql",
"BUILD_VERSION": "v2.1.5",
"BUILD_VERSION": "v2.1.6",
"// 1000 * 60 * 10 = 10 mins": "",
"SSR_CACHE_TIME": 60000
}
5 changes: 0 additions & 5 deletions config/config.local.json

This file was deleted.

Binary file modified deploy/production/web.tar.gz
Binary file not shown.
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,18 @@
"version": "0.8.1",
"license": "Apache License 2.0",
"scripts": {
"dev": "cross-env NODE_ENV=dev node server.js",
"prod": "cross-env NODE_ENV=production run-p server",
"local": "cross-env NODE_ENV=local node server",
"nextdev": "cross-env NODE_ENV=dev next dev",
"nextstart": "next-boost",
"nextstart2": "cross-env NODE_ENV=production next start -p 3000",
"dev": "cross-env NODE_ENV=dev next dev",
"dev.boost": "next-boost",
"ci": "cross-env NODE_ENV=ci node server",
"server": "npm run clean && node server.js",
"build": "next build",
"build:clean": "run-s dist clean",
"build.prod": "cross-env NODE_ENV=production next build",
"build.dev": "cross-env NODE_ENV=dev next build",
"build.ci": "cross-env NODE_ENV=ci next build",
"size.check": "bundlewatch --config size-limit.config.json",
"serve": "cross-env NODE_ENV=production next start -p ${SERVE_PORT}",
"serve.dev": "cross-env NODE_ENV=dev SERVE_PORT=${SERVE_PORT} node server",
"serve.prod.old": "cross-env NODE_ENV=production SERVE_PORT=${SERVE_PORT} node server",
"serve.dev": "cross-env NODE_ENV=dev next start -p ${SERVE_PORT}",
"serve.prod.server": "cross-env NODE_ENV=production SERVE_PORT=${SERVE_PORT} node server",
"serve.prod.boost": "cross-env NODE_ENV=production next-boost -p ${SERVE_PORT}",
"serve.prod": "cross-env NODE_ENV=production next start -p ${SERVE_PORT}",
"dist": "next build && next export -o \"build\"",
Expand Down