Skip to content

Commit

Permalink
Merge pull request #13 from NEARBuilders/chore/replace-bundle
Browse files Browse the repository at this point in the history
fix scripts
  • Loading branch information
elliotBraem authored Sep 27, 2024
2 parents 2e038c8 + 3c1571c commit 636144c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Once done, remember to [Publish the build to NEARFS](./gateway-bundle/README.md#
Rather than deploying to a hosting provider like Vercel, this repository comes equipped with the scripts necessary to deploy to [Web4](https://github.com/vgrichina/web4), for fully decentralized web hosting. For full documentation, refer to [web4-deploy](https://github.com/vgrichina/web4-deploy).
1. Build the distribution bundle, `pnpm run build`
1. Build the distribution bundle, `pnpm run build`. This will populate metadata via the index widget's metadata json, and use details from bos.config.json to consturct the `index.html`.
2. Be sure to have deployed a web4 smart contract, such as the [web4-min-contract](https://github.com/vgrichina/web4-min-contract) to web4.YOUR_ACCOUNT.near
3. Configure with the web4 account and run `pnpm run web4:deploy`
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"url": "https://github.com/NEARBuilders/mintbos-marketplace-template.git"
},
"private": true,
"workspaces": [
"gateway-bundle"
],
"workspaces": [
"gateway-bundle"
],
"scripts": {
"bw": "bos-workspace",
"dev": "pnpm run bw dev",
Expand All @@ -25,6 +25,7 @@
},
"devDependencies": {
"@playwright/test": "^1.38.1",
"axios": "^1.7.7",
"bos-workspace": "^1.0.0-alpha.37",
"commander": "^12.1.0",
"concurrently": "^8.2.2",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/generate-index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function getBundleUrls(bundleUrl, network, rootDir) {
bundleUrl.startsWith("../")
) {
// Local path
const packageJsonPath = path.join(rootDir, "gateway", "package.json");
const packageJsonPath = path.join(rootDir, "gateway-bundle", "package.json");
const packageJson = await readJsonFile(packageJsonPath);
const cid = packageJson.nearfs?.cid;

Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare-release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function exec(command, env = {}) {
}

async function updatePackageJson(cid) {
const packageJsonPath = path.join(rootDir, "package.json");
const packageJsonPath = path.join(rootDir, "gateway-bundle", "package.json");
let packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf8"));
packageJson.nearfs = { ...packageJson.nearfs, cid };
await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
Expand Down

0 comments on commit 636144c

Please sign in to comment.