From 7b35b09695585cea06432d7f496afa02c0c63a1e Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:15:08 +0800 Subject: [PATCH 01/39] Update ci.json --- .codesandbox/ci.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 7dd5f76d8..23847988c 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,4 @@ { "sandboxes": ["2d17z"], - "packages": ["."], "node": "16" } From 3d6f7c98952fda3eaa641b4bb79b8fbd3ffe3ab7 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:18:28 +0800 Subject: [PATCH 02/39] Update ci.json --- .codesandbox/ci.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 23847988c..cdefcc896 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,4 +1,5 @@ { "sandboxes": ["2d17z"], + "installCommand": "install", "node": "16" } From 148eca54e14b7dcdb3dc4383efe982ecd6d113af Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:19:19 +0800 Subject: [PATCH 03/39] Update ci.json --- .codesandbox/ci.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index cdefcc896..f82d88d29 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,5 @@ { "sandboxes": ["2d17z"], - "installCommand": "install", + "installCommand": "run install", "node": "16" } From 957d8dbc56343fef14709a1bcd0b8a2c81b03394 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:21:58 +0800 Subject: [PATCH 04/39] Update ci.json --- .codesandbox/ci.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index f82d88d29..1304e7313 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,5 @@ { "sandboxes": ["2d17z"], - "installCommand": "run install", + "installCommand": "npm install", "node": "16" } From f27f8e7e3b79097e867c0f4d23d50b6540c3bc27 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:22:51 +0800 Subject: [PATCH 05/39] Update ci.json --- .codesandbox/ci.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 1304e7313..cdefcc896 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,5 @@ { "sandboxes": ["2d17z"], - "installCommand": "npm install", + "installCommand": "install", "node": "16" } From 88cfab1e547813eabb7c4ec6bd3a72c38df6bbcf Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:24:00 +0800 Subject: [PATCH 06/39] Update package.json --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ac35b5b0..6bf5b1a59 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,8 @@ "test:unit": "jest --selectProjects unit", "test": "jest && run-s test:e2e", "watch:css": "npm run css -- -o themes -w", - "watch:js": "node build/build.js" + "watch:js": "node build/build.js", + "install": "npm install" }, "husky": { "hooks": { From b417fc6696bb7009300a776c9a42e1fabaf26941 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:25:56 +0800 Subject: [PATCH 07/39] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6bf5b1a59..544f48432 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "test": "jest && run-s test:e2e", "watch:css": "npm run css -- -o themes -w", "watch:js": "node build/build.js", - "install": "npm install" + "install": "npm install && npm rum build" }, "husky": { "hooks": { From bcf9236bdf645531a66f2a8f096a494819493562 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:27:22 +0800 Subject: [PATCH 08/39] Update ci.json --- .codesandbox/ci.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index cdefcc896..23847988c 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,4 @@ { "sandboxes": ["2d17z"], - "installCommand": "install", "node": "16" } From f0a01e6d2cdc3cfecb4b29753aacd2c3d1723bb8 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:29:39 +0800 Subject: [PATCH 09/39] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 544f48432..afd96ca90 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "test": "jest && run-s test:e2e", "watch:css": "npm run css -- -o themes -w", "watch:js": "node build/build.js", - "install": "npm install && npm rum build" + "init-dep": "npm install" }, "husky": { "hooks": { From 9155fe4d0ca492d89ea69e5521c78ea0b428f256 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:30:43 +0800 Subject: [PATCH 10/39] Update ci.json --- .codesandbox/ci.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 23847988c..b2f89e8a7 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,4 +1,5 @@ { "sandboxes": ["2d17z"], + "installCommand": "init-dep", "node": "16" } From e22e6af2c16e53cab888a3bf2de75651e85624ba Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:40:38 +0800 Subject: [PATCH 11/39] Update ci.json --- .codesandbox/ci.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index b2f89e8a7..5e1e9794d 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,4 @@ { "sandboxes": ["2d17z"], - "installCommand": "init-dep", - "node": "16" + "node": "18" } From fb3f8d5e589748c0cd1fea7fd85c489dac370f65 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 01:43:17 +0800 Subject: [PATCH 12/39] Update ci.json --- .codesandbox/ci.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 5e1e9794d..23847988c 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,4 +1,4 @@ { "sandboxes": ["2d17z"], - "node": "18" + "node": "16" } From c0d64cfc1ef898e83cee819a6454f0b6610b0ef1 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 05:00:58 +0800 Subject: [PATCH 13/39] Update build.js --- build/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.js b/build/build.js index 4ba4ec41f..f5402304a 100644 --- a/build/build.js +++ b/build/build.js @@ -78,7 +78,7 @@ async function buildCore() { async function buildAllPlugin() { var plugins = [ {name: 'search', input: 'search/index.js'}, - {name: 'ga', input: 'ga.js'}, + //{name: 'ga', input: 'ga.js'}, {name: 'gtag', input: 'gtag.js'}, {name: 'matomo', input: 'matomo.js'}, {name: 'emoji', input: 'emoji.js'}, From 622d8df5933b94bb98ae3745d089422e8afa8335 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 05:16:56 +0800 Subject: [PATCH 14/39] Update build.js --- build/build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/build.js b/build/build.js index f5402304a..2690000ae 100644 --- a/build/build.js +++ b/build/build.js @@ -78,13 +78,13 @@ async function buildCore() { async function buildAllPlugin() { var plugins = [ {name: 'search', input: 'search/index.js'}, - //{name: 'ga', input: 'ga.js'}, + {name: 'ga', input: 'ga.js'}, {name: 'gtag', input: 'gtag.js'}, {name: 'matomo', input: 'matomo.js'}, {name: 'emoji', input: 'emoji.js'}, {name: 'external-script', input: 'external-script.js'}, {name: 'front-matter', input: 'front-matter/index.js'}, - {name: 'zoom-image', input: 'zoom-image.js'}, + // {name: 'zoom-image', input: 'zoom-image.js'}, {name: 'disqus', input: 'disqus.js'}, {name: 'gitalk', input: 'gitalk.js'} ] From 3887ffe9749e845d60e81bc2237d887a69d2e3a0 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 05:20:14 +0800 Subject: [PATCH 15/39] Update build.js --- build/build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/build.js b/build/build.js index 2690000ae..b09bf62c2 100644 --- a/build/build.js +++ b/build/build.js @@ -82,9 +82,9 @@ async function buildAllPlugin() { {name: 'gtag', input: 'gtag.js'}, {name: 'matomo', input: 'matomo.js'}, {name: 'emoji', input: 'emoji.js'}, - {name: 'external-script', input: 'external-script.js'}, + //{name: 'external-script', input: 'external-script.js'}, {name: 'front-matter', input: 'front-matter/index.js'}, - // {name: 'zoom-image', input: 'zoom-image.js'}, + {name: 'zoom-image', input: 'zoom-image.js'}, {name: 'disqus', input: 'disqus.js'}, {name: 'gitalk', input: 'gitalk.js'} ] From b9d86ea503e385d15d556eebfe9a1a2c03feebba Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 05:22:04 +0800 Subject: [PATCH 16/39] Update build.js --- build/build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/build.js b/build/build.js index b09bf62c2..a2056c833 100644 --- a/build/build.js +++ b/build/build.js @@ -81,8 +81,8 @@ async function buildAllPlugin() { {name: 'ga', input: 'ga.js'}, {name: 'gtag', input: 'gtag.js'}, {name: 'matomo', input: 'matomo.js'}, - {name: 'emoji', input: 'emoji.js'}, - //{name: 'external-script', input: 'external-script.js'}, + // {name: 'emoji', input: 'emoji.js'}, + {name: 'external-script', input: 'external-script.js'}, {name: 'front-matter', input: 'front-matter/index.js'}, {name: 'zoom-image', input: 'zoom-image.js'}, {name: 'disqus', input: 'disqus.js'}, From fac0d3084f522d94afa88ddcd1cfafe928ca66c6 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 07:42:16 +0800 Subject: [PATCH 17/39] Update package.json --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index afd96ca90..4cd5d908a 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,10 @@ "build:css": "mkdirp themes && npm run css -- -o themes", "build:emoji": "node ./build/emoji.js", "build:js": "cross-env NODE_ENV=production node build/build.js", + "build:js:ci": "cross-env NODE_ENV=ci node build/build.js", "build:test": "npm run build && npm test", "build": "rimraf lib themes && run-s build:js build:css build:css:min build:cover build:emoji", + "build:ci": "rimraf lib themes && run-s build:js:ci build:css build:css:min build:cover build:emoji", "css": "node build/css", "dev": "run-p serve watch:*", "docker:build:test": "npm run docker:cli -- build:test", From 5fa8dc26d555acd921c81c32d6c9d99bb7c49ee9 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 07:45:14 +0800 Subject: [PATCH 18/39] Update ci.json --- .codesandbox/ci.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 23847988c..cb75c46eb 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,4 +1,5 @@ { "sandboxes": ["2d17z"], + "buildCommand": "build:ci", "node": "16" } From f889c4fb88d6ffab6fdbe5d4865d94eb62694db0 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 07:47:24 +0800 Subject: [PATCH 19/39] Update build.js --- build/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.js b/build/build.js index a2056c833..4ba4ec41f 100644 --- a/build/build.js +++ b/build/build.js @@ -81,7 +81,7 @@ async function buildAllPlugin() { {name: 'ga', input: 'ga.js'}, {name: 'gtag', input: 'gtag.js'}, {name: 'matomo', input: 'matomo.js'}, - // {name: 'emoji', input: 'emoji.js'}, + {name: 'emoji', input: 'emoji.js'}, {name: 'external-script', input: 'external-script.js'}, {name: 'front-matter', input: 'front-matter/index.js'}, {name: 'zoom-image', input: 'zoom-image.js'}, From fe377f876a0cb104fb11338f494b825368b1b183 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 07:48:02 +0800 Subject: [PATCH 20/39] Update package.json --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 4cd5d908a..45606ac0b 100644 --- a/package.json +++ b/package.json @@ -52,8 +52,7 @@ "test:unit": "jest --selectProjects unit", "test": "jest && run-s test:e2e", "watch:css": "npm run css -- -o themes -w", - "watch:js": "node build/build.js", - "init-dep": "npm install" + "watch:js": "node build/build.js" }, "husky": { "hooks": { From a19e2d66f510f9e9c71b36b7f17bda56c2cd27f6 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 07:51:26 +0800 Subject: [PATCH 21/39] Update build.js --- build/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.js b/build/build.js index 4ba4ec41f..d2e62257a 100644 --- a/build/build.js +++ b/build/build.js @@ -88,7 +88,7 @@ async function buildAllPlugin() { {name: 'disqus', input: 'disqus.js'}, {name: 'gitalk', input: 'gitalk.js'} ] - + exit const promises = plugins.map(item => { return build({ input: 'src/plugins/' + item.input, From 6fd7a421be8b9fcb25202526f4dc4d1575262659 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 10:36:22 +0800 Subject: [PATCH 22/39] Update build.js --- build/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.js b/build/build.js index d2e62257a..4ba4ec41f 100644 --- a/build/build.js +++ b/build/build.js @@ -88,7 +88,7 @@ async function buildAllPlugin() { {name: 'disqus', input: 'disqus.js'}, {name: 'gitalk', input: 'gitalk.js'} ] - exit + const promises = plugins.map(item => { return build({ input: 'src/plugins/' + item.input, From 81e998d845cbef4fbba4b44ed66d2a564c1d759b Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 10:38:53 +0800 Subject: [PATCH 23/39] Update package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 45606ac0b..747e4a9a4 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "lint": "eslint .", "postinstall": "opencollective-postinstall", "prepare": "npm run build", + "prepare:ci": "npm run build:ci", "pub:next": "cross-env RELEASE_TAG=next sh build/release.sh", "pub": "sh build/release.sh", "serve": "node server", From 786c9aa5c4f627eb69dcd1f310587a906919e187 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 10:39:14 +0800 Subject: [PATCH 24/39] Update ci.json --- .codesandbox/ci.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index cb75c46eb..18ce71bc2 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,5 @@ { "sandboxes": ["2d17z"], - "buildCommand": "build:ci", + "buildCommand": "prepare:ci", "node": "16" } From 6e2875268c7f11fab0ddf49a08b8a292c9416c92 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 10:53:26 +0800 Subject: [PATCH 25/39] Update build.js --- build/build.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/build/build.js b/build/build.js index 4ba4ec41f..e6651cf3b 100644 --- a/build/build.js +++ b/build/build.js @@ -96,16 +96,6 @@ async function buildAllPlugin() { }) }) - if (isProd) { - plugins.forEach(item => { - promises.push(build({ - input: 'src/plugins/' + item.input, - output: 'plugins/' + item.name + '.min.js', - plugins: [uglify()] - })) - }) - } - await Promise.all(promises) } From ac58b49792412576e489784e4379c285ac5f44f9 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:23:19 +0800 Subject: [PATCH 26/39] Update ci.json --- .codesandbox/ci.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 18ce71bc2..031aa66d1 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,6 @@ { - "sandboxes": ["2d17z"], + "installCommand": "install", "buildCommand": "prepare:ci", + "sandboxes": ["2d17z"], "node": "16" } From 15c97b4925afa42ffd18bf1e3b0f7a2e8610dbe6 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:24:38 +0800 Subject: [PATCH 27/39] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 747e4a9a4..eef503d66 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "lint": "eslint .", "postinstall": "opencollective-postinstall", "prepare": "npm run build", - "prepare:ci": "npm run build:ci", + "prepare:ci": "npm install && npm run build:ci", "pub:next": "cross-env RELEASE_TAG=next sh build/release.sh", "pub": "sh build/release.sh", "serve": "node server", From 2d8c91afcb956d795d3bb908ba38962d97182b96 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:25:14 +0800 Subject: [PATCH 28/39] Update build.js --- build/build.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/build.js b/build/build.js index e6651cf3b..4ba4ec41f 100644 --- a/build/build.js +++ b/build/build.js @@ -96,6 +96,16 @@ async function buildAllPlugin() { }) }) + if (isProd) { + plugins.forEach(item => { + promises.push(build({ + input: 'src/plugins/' + item.input, + output: 'plugins/' + item.name + '.min.js', + plugins: [uglify()] + })) + }) + } + await Promise.all(promises) } From 65ca139a2d1c6f0c8feb5fbe7fea4073f9c34ae0 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:26:47 +0800 Subject: [PATCH 29/39] Update ci.json --- .codesandbox/ci.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 031aa66d1..8304b3efa 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,5 @@ { - "installCommand": "install", + "installCommand": false, "buildCommand": "prepare:ci", "sandboxes": ["2d17z"], "node": "16" From 245b3c6025755854fd64df6425f084e9f142fa81 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:31:14 +0800 Subject: [PATCH 30/39] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eef503d66..860000698 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "lint": "eslint .", "postinstall": "opencollective-postinstall", "prepare": "npm run build", - "prepare:ci": "npm install && npm run build:ci", + "prepare:ci": "npm install --no-ci && npm run build:ci", "pub:next": "cross-env RELEASE_TAG=next sh build/release.sh", "pub": "sh build/release.sh", "serve": "node server", From 9fd0f505f0a3c3024a961a52778c46fbb41d04d2 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:32:45 +0800 Subject: [PATCH 31/39] Update ci.json --- .codesandbox/ci.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 8304b3efa..00bee7dae 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,6 +1,6 @@ { "installCommand": false, - "buildCommand": "prepare:ci", + "buildCommand": false, "sandboxes": ["2d17z"], "node": "16" } From a9e3666a01633eaf875b0c18fdc601112cc7f8c1 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:35:28 +0800 Subject: [PATCH 32/39] Create tasks.json --- .codesandbox/tasks.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .codesandbox/tasks.json diff --git a/.codesandbox/tasks.json b/.codesandbox/tasks.json new file mode 100644 index 000000000..b4d8ca7e2 --- /dev/null +++ b/.codesandbox/tasks.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://codesandbox.io/schemas/tasks.json", + "setupTasks": [ + { + "name": "Installing Dependencies", + "command": "npm install --no-ci" + }, + { + "name": "Building", + "command": "npm run build:ci" + } + ] +} From d213042d1a6f3dbd2db376487f46d9c7f5593c78 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:36:34 +0800 Subject: [PATCH 33/39] Delete tasks.json --- .codesandbox/tasks.json | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .codesandbox/tasks.json diff --git a/.codesandbox/tasks.json b/.codesandbox/tasks.json deleted file mode 100644 index b4d8ca7e2..000000000 --- a/.codesandbox/tasks.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://codesandbox.io/schemas/tasks.json", - "setupTasks": [ - { - "name": "Installing Dependencies", - "command": "npm install --no-ci" - }, - { - "name": "Building", - "command": "npm run build:ci" - } - ] -} From 08239db6e9d5f80de737fca82a6de59818857939 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:36:54 +0800 Subject: [PATCH 34/39] Update ci.json --- .codesandbox/ci.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 00bee7dae..8c26874ff 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,4 @@ { - "installCommand": false, "buildCommand": false, "sandboxes": ["2d17z"], "node": "16" From 95e462fc02d4a0c5b223350dce384823bd093f53 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:39:08 +0800 Subject: [PATCH 35/39] Update package.json --- package.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 860000698..9247b5a69 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,10 @@ "build:css:min": "mkdirp lib/themes && npm run css -- -o lib/themes && node build/mincss.js", "build:css": "mkdirp themes && npm run css -- -o themes", "build:emoji": "node ./build/emoji.js", - "build:js": "cross-env NODE_ENV=production node build/build.js", - "build:js:ci": "cross-env NODE_ENV=ci node build/build.js", + "build:js": "node build/build.js", + "build:js:min": "cross-env NODE_ENV=production node build/build.js", "build:test": "npm run build && npm test", - "build": "rimraf lib themes && run-s build:js build:css build:css:min build:cover build:emoji", - "build:ci": "rimraf lib themes && run-s build:js:ci build:css build:css:min build:cover build:emoji", + "build": "rimraf lib themes && run-s build:js build:js:min build:css build:css:min build:cover build:emoji", "css": "node build/css", "dev": "run-p serve watch:*", "docker:build:test": "npm run docker:cli -- build:test", @@ -44,7 +43,6 @@ "lint": "eslint .", "postinstall": "opencollective-postinstall", "prepare": "npm run build", - "prepare:ci": "npm install --no-ci && npm run build:ci", "pub:next": "cross-env RELEASE_TAG=next sh build/release.sh", "pub": "sh build/release.sh", "serve": "node server", From a23d974fc6aacadf7293b21f2c25610be384fcab Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:55:16 +0800 Subject: [PATCH 36/39] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9247b5a69..a6cfb2c67 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "test:unit": "jest --selectProjects unit", "test": "jest && run-s test:e2e", "watch:css": "npm run css -- -o themes -w", - "watch:js": "node build/build.js" + "watch:js": "cross-env NODE_ENV=watch node build/build.js" }, "husky": { "hooks": { From f12eb3f41bc83ea98dd2821b04003365a573b08b Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:56:16 +0800 Subject: [PATCH 37/39] Update build.js --- build/build.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/build.js b/build/build.js index 4ba4ec41f..82daa95e7 100644 --- a/build/build.js +++ b/build/build.js @@ -5,6 +5,7 @@ const nodeResolve = require('rollup-plugin-node-resolve') const { uglify } = require('rollup-plugin-uglify') const replace = require('rollup-plugin-replace') const isProd = process.env.NODE_ENV === 'production' +const isWatch = process.env.NODE_ENV === 'watch' const version = process.env.VERSION || require('../package.json').version const chokidar = require('chokidar') const path = require('path') @@ -110,7 +111,7 @@ async function buildAllPlugin() { } async function main() { - if (!isProd) { + if (isWatch) { chokidar .watch(['src/core', 'src/plugins'], { atomic: true, From 7f8054a974a26ac638da4a75d54a54c0803408df Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:57:28 +0800 Subject: [PATCH 38/39] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a6cfb2c67..b96354739 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "build:js": "node build/build.js", "build:js:min": "cross-env NODE_ENV=production node build/build.js", "build:test": "npm run build && npm test", - "build": "rimraf lib themes && run-s build:js build:js:min build:css build:css:min build:cover build:emoji", + "build": "rimraf lib themes && run-s build:js build:css build:css:min build:cover build:emoji", "css": "node build/css", "dev": "run-p serve watch:*", "docker:build:test": "npm run docker:cli -- build:test", From ab3a7c62fdc42624348d47de7fef008b07c2512a Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Thu, 13 Jul 2023 11:59:02 +0800 Subject: [PATCH 39/39] Update package.json --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index b96354739..6742dc6c9 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,7 @@ "build:css:min": "mkdirp lib/themes && npm run css -- -o lib/themes && node build/mincss.js", "build:css": "mkdirp themes && npm run css -- -o themes", "build:emoji": "node ./build/emoji.js", - "build:js": "node build/build.js", - "build:js:min": "cross-env NODE_ENV=production node build/build.js", + "build:js": "cross-env NODE_ENV=production node build/build.js", "build:test": "npm run build && npm test", "build": "rimraf lib themes && run-s build:js build:css build:css:min build:cover build:emoji", "css": "node build/css",