From 05d7ec7bc9f14b22f08da7a555c51dae98b180e8 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Sat, 6 Jul 2024 17:12:54 -0400 Subject: [PATCH 1/9] package.json: description --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 9eeef09..9eddd32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "@eosnetwork/rex-staking", "version": "0.0.1", + "description": "Static Svelte website that simplifies the process of staking, un-staking, and claiming EOS REX rewards post-tokenomics-2 upgrade.", "private": true, "scripts": { "build": "vite build", From 53b36015f47591dd2c4b28f4e138c7bbf403d9a8 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Sat, 6 Jul 2024 17:13:49 -0400 Subject: [PATCH 2/9] package.json: repository --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 9eddd32..c28def8 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "@eosnetwork/rex-staking", "version": "0.0.1", "description": "Static Svelte website that simplifies the process of staking, un-staking, and claiming EOS REX rewards post-tokenomics-2 upgrade.", + "repository": "git@github.com:eosnetworkfoundation/rex-staking-portal.git", "private": true, "scripts": { "build": "vite build", From 4178bd125badb821127bbe72544c7b7279454906 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Sat, 6 Jul 2024 17:17:46 -0400 Subject: [PATCH 3/9] package.json: homepage --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index c28def8..4965780 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.0.1", "description": "Static Svelte website that simplifies the process of staking, un-staking, and claiming EOS REX rewards post-tokenomics-2 upgrade.", "repository": "git@github.com:eosnetworkfoundation/rex-staking-portal.git", + "homepage": "https://github.com/eosnetworkfoundation/rex-staking-portal", "private": true, "scripts": { "build": "vite build", From 65ff2f2b3b5fe463543d21b31c62d264be1da77b Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Sat, 6 Jul 2024 17:19:27 -0400 Subject: [PATCH 4/9] package.json: author --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index 4965780..890598b 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,11 @@ "description": "Static Svelte website that simplifies the process of staking, un-staking, and claiming EOS REX rewards post-tokenomics-2 upgrade.", "repository": "git@github.com:eosnetworkfoundation/rex-staking-portal.git", "homepage": "https://github.com/eosnetworkfoundation/rex-staking-portal", + "author": { + "name": "EOS Network Foundation Automation", + "email": "webmaster@eosnetwork.com", + "url": "https://eosnetwork.com" + }, "private": true, "scripts": { "build": "vite build", From 8b4cc64a816651746d3fba07dfa4238a70ebe253 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Sat, 6 Jul 2024 17:19:51 -0400 Subject: [PATCH 5/9] package.json: license --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 890598b..a78a032 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "email": "webmaster@eosnetwork.com", "url": "https://eosnetwork.com" }, + "license": "MIT", "private": true, "scripts": { "build": "vite build", From b48588a62bcd077f7c8a7331a0649a43f737e636 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Sat, 6 Jul 2024 17:26:01 -0400 Subject: [PATCH 6/9] Use package.json "files" key to pack build folder with "yarn pack" --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index a78a032..f6b9579 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,9 @@ "reset": "scripts/reset.sh", "start": "scripts/start.sh" }, + "files": [ + "build" + ], "devDependencies": { "@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/adapter-netlify": "^4.2.0", From 86fa92f37717d30c68c0075a346cd7ff735c6ec9 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Sat, 6 Jul 2024 17:27:53 -0400 Subject: [PATCH 7/9] Roll .npmrc into package.json --- .npmrc | 1 - package.json | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index b6f27f1..0000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -engine-strict=true diff --git a/package.json b/package.json index f6b9579..a4c17ce 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "license": "MIT", "private": true, + "engineStrict": true, "scripts": { "build": "vite build", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", From 33d271b328b84a11bdc20dcf995b7d0b84df98a3 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Sat, 6 Jul 2024 17:55:29 -0400 Subject: [PATCH 8/9] README: Caddy runs from a docker container --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f4ab8f..2ebccc1 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Running this... ```bash yarn start ``` -...uses [Caddy](https://caddyserver.com) in `file_server` mode to publish the build artifacts in the `build` folder in the root of the repo at port `8443` to emulate an S3 bucket. You can load this in your browser by navigating to [https://localhost:8443](https://localhost:8443). +...uses the [Caddy](https://caddyserver.com) docker container in `file_server` mode to publish the build artifacts in the `build` folder in the root of the repo at port `8443` to emulate an S3 bucket. You can load this in your browser by navigating to [https://localhost:8443](https://localhost:8443). Press `[Ctrl]` + `[C]` to stop the server. From f648c06e12693d0bb49e961630103bb265eff9ca Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Sat, 6 Jul 2024 17:56:23 -0400 Subject: [PATCH 9/9] Document "yarn pack" command --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 2ebccc1..c8041f9 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ You can see it live at [https://stake.eosnetwork.com](https://stake.eosnetwork.c 1. [Initialization](#initialization) 1. [Build](#build) 1. [Start](#start) + 1. [Pack](#pack) 1. [See Also](#see-also) @@ -80,6 +81,35 @@ yarn start Press `[Ctrl]` + `[C]` to stop the server. +### Pack +You can pack the build products into a `*.tgz` archive for easy distribution. +```bash +yarn pack +``` +This will generate a `*.tgz` archive in the root of the repo with a structure like this. +``` +eosnetwork-rex-staking-v0.0.1.tgz +└── package + ├── build + │   ├── abis + │   │   └── eosio.system.abi + │   ├── _app + │   │   ├── env.js + │   │   ├── immutable + │   │   │   ├── assets + │   │   │   ├── chunks + │   │   │   ├── entry + │   │   │   └── nodes + │   │   └── version.json + │   ├── favicon.png + │   ├── index.html + │   └── ogimage.png + ├── LICENSE + ├── package.json + └── README.md +``` +This is useful for sharing the project with others or for deploying it to a server, but is in no way required for the site to function. + ## See Also More resources. - [aws-cloudwatch-alarm-handler](https://github.com/eosnetworkfoundation/aws-cloudwatch-alarm-handler) lambda