From 6a425b2fc962e8945fd1c13b7918b556e8e35e44 Mon Sep 17 00:00:00 2001 From: jihchi Date: Sun, 18 Apr 2021 12:34:19 +0800 Subject: [PATCH 1/5] Deprecate @snowpack/plugin-run-script in favor of @jihchi/plugin-rescript --- package.json | 1 + snowpack.config.js | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 2886d71..c15e21b 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "react-dom": "^17.0.2" }, "devDependencies": { + "@jihchi/plugin-rescript": "0.0.0", "@snowpack/plugin-dotenv": "^2.1.0", "@snowpack/plugin-react-refresh": "^2.4.2", "@snowpack/plugin-run-script": "^2.3.0", diff --git a/snowpack.config.js b/snowpack.config.js index 30cfc26..369c331 100644 --- a/snowpack.config.js +++ b/snowpack.config.js @@ -8,13 +8,7 @@ module.exports = { plugins: [ '@snowpack/plugin-react-refresh', '@snowpack/plugin-dotenv', - [ - '@snowpack/plugin-run-script', - { - cmd: 'npm run build:res', - watch: '$1 -- -w', - }, - ], + '@jihchi/plugin-rescript', ], packageOptions: { /* ... */ From 7d8211b1dd0c4e69614c15dec0dd681dc5bdbfc0 Mon Sep 17 00:00:00 2001 From: jihchi Date: Sun, 18 Apr 2021 12:38:05 +0800 Subject: [PATCH 2/5] Remove redundant rescript-relevant run-scripts --- package.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c15e21b..a25ab8a 100644 --- a/package.json +++ b/package.json @@ -30,10 +30,8 @@ "access": "public" }, "scripts": { - "build": "npm run build:res && snowpack build", - "build:res": "rescript build", - "clean": "npm run clean:res", - "clean:res": "rescript clean", + "build": "snowpack build", + "clean": "rescript clean", "start": "snowpack dev", "test": "web-test-runner \"src/**/__tests__/*.bs.js\"" }, From e433b9cca1099748d28c60c4bfda3bd3d7b1e49e Mon Sep 17 00:00:00 2001 From: jihchi Date: Sun, 25 Apr 2021 15:43:41 +0800 Subject: [PATCH 3/5] Stick with snowpack version 3.0.x, as of now, newer version has a regression --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a25ab8a..59a53cb 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,6 @@ "@web/test-runner": "^0.12.19", "chai": "^4.3.4", "rescript": "^9.1.1", - "snowpack": "^3.3.3" + "snowpack": "~3.0" } } From 15c153f401f77779ea62b681d926b588cf0209b8 Mon Sep 17 00:00:00 2001 From: jihchi Date: Sun, 25 Apr 2021 16:03:27 +0800 Subject: [PATCH 4/5] Remove unused plugin --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 59a53cb..75bb0ff 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "@jihchi/plugin-rescript": "0.0.0", "@snowpack/plugin-dotenv": "^2.1.0", "@snowpack/plugin-react-refresh": "^2.4.2", - "@snowpack/plugin-run-script": "^2.3.0", "@snowpack/web-test-runner-plugin": "^0.2.2", "@testing-library/react": "^11.2.6", "@web/test-runner": "^0.12.19", From c8d2d628f427f35a35858cf0a1a12bdaaafdfca3 Mon Sep 17 00:00:00 2001 From: jihchi Date: Sun, 25 Apr 2021 16:14:31 +0800 Subject: [PATCH 5/5] Bump version of plugin-rescript to 1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 75bb0ff..dded11f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "react-dom": "^17.0.2" }, "devDependencies": { - "@jihchi/plugin-rescript": "0.0.0", + "@jihchi/plugin-rescript": "^1.0.0", "@snowpack/plugin-dotenv": "^2.1.0", "@snowpack/plugin-react-refresh": "^2.4.2", "@snowpack/web-test-runner-plugin": "^0.2.2",