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

Commit 3ef7777

Browse files
authored
chore: clean up npm scripts (#1249)
* chore(npm-script): clean up * chore(deploy): bump version to v2.1.6
1 parent c0b093a commit 3ef7777

File tree

7 files changed

+11
-22
lines changed

7 files changed

+11
-22
lines changed

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ tsconfig.tsbuildinfo
1616
./deploy*
1717
*.tar.gz
1818
*.xml
19-
public/*
19+
public/*
20+
Makefile

Makefile

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ init:
2121
dep:
2222
npm install # for commitizen
2323

24-
# shortcut for serve.local
2524
dev: before_action
26-
@$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.local.json > /tmp/config.json
25+
@$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.dev.json > /tmp/config.json
2726
@cp /tmp/config.json ./config/config.json
28-
npm run local
27+
npm run dev
2928

3029
build:
3130
npm build
@@ -46,8 +45,6 @@ serve.help:
4645
serve:
4746
$(call serve.help)
4847
@echo "\n"
49-
serve.local:
50-
npm run local
5148
serve.dev:
5249
npm run serve.dev
5350
serve.prod:

config/config.dev.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"//--- endpoint configs ---//": "",
3-
"GRAPHQL_ENDPOINT": "https://devapi.coderplanets.com/graphiql"
3+
"GRAPHQL_ENDPOINT": "http://localhost:4001/graphiql",
4+
"// GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql"
45
}

config/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"//--- contact configs ---//": "",
6060
"EMAIL_SUPPORT": "coderplanets@outlook.com",
6161
"// GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql",
62-
"BUILD_VERSION": "v2.1.5",
62+
"BUILD_VERSION": "v2.1.6",
6363
"// 1000 * 60 * 10 = 10 mins": "",
6464
"SSR_CACHE_TIME": 60000
6565
}

config/config.local.json

-5
This file was deleted.

deploy/production/web.tar.gz

-183 Bytes
Binary file not shown.

package.json

+4-9
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,18 @@
33
"version": "0.8.1",
44
"license": "Apache License 2.0",
55
"scripts": {
6-
"dev": "cross-env NODE_ENV=dev node server.js",
7-
"prod": "cross-env NODE_ENV=production run-p server",
8-
"local": "cross-env NODE_ENV=local node server",
9-
"nextdev": "cross-env NODE_ENV=dev next dev",
10-
"nextstart": "next-boost",
11-
"nextstart2": "cross-env NODE_ENV=production next start -p 3000",
6+
"dev": "cross-env NODE_ENV=dev next dev",
7+
"dev.boost": "next-boost",
128
"ci": "cross-env NODE_ENV=ci node server",
13-
"server": "npm run clean && node server.js",
149
"build": "next build",
1510
"build:clean": "run-s dist clean",
1611
"build.prod": "cross-env NODE_ENV=production next build",
1712
"build.dev": "cross-env NODE_ENV=dev next build",
1813
"build.ci": "cross-env NODE_ENV=ci next build",
1914
"size.check": "bundlewatch --config size-limit.config.json",
2015
"serve": "cross-env NODE_ENV=production next start -p ${SERVE_PORT}",
21-
"serve.dev": "cross-env NODE_ENV=dev SERVE_PORT=${SERVE_PORT} node server",
22-
"serve.prod.old": "cross-env NODE_ENV=production SERVE_PORT=${SERVE_PORT} node server",
16+
"serve.dev": "cross-env NODE_ENV=dev next start -p ${SERVE_PORT}",
17+
"serve.prod.server": "cross-env NODE_ENV=production SERVE_PORT=${SERVE_PORT} node server",
2318
"serve.prod.boost": "cross-env NODE_ENV=production next-boost -p ${SERVE_PORT}",
2419
"serve.prod": "cross-env NODE_ENV=production next start -p ${SERVE_PORT}",
2520
"dist": "next build && next export -o \"build\"",

0 commit comments

Comments
 (0)