From ea08b87e90da3e5808a0377db102b8f11adcc5b2 Mon Sep 17 00:00:00 2001 From: exromany Date: Thu, 29 Jul 2021 11:56:57 +0300 Subject: [PATCH] fix scripts for windows-users --- docs/deploy.md | 4 ++-- js/packages/web/package.json | 7 ++++--- js/packages/web/public/.nojekyll | 0 js/yarn.lock | 9 ++++++++- 4 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 js/packages/web/public/.nojekyll diff --git a/docs/deploy.md b/docs/deploy.md index 17310ef..749fa09 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -8,7 +8,7 @@ Pay attention to these two lines: ```json "deploy:gh": "yarn export && gh-pages -d ../../build/web --repo https://github.com/metaplex-foundation/metaplex -t true", -"deploy": "ASSET_PREFIX=/metaplex/ yarn build && yarn deploy:gh", +"deploy": "cross-env ASSET_PREFIX=/metaplex/ yarn build && yarn deploy:gh", ``` There are 2 things to change: @@ -20,7 +20,7 @@ After that, the lines will look like this: ```json "deploy:gh": "yarn export && gh-pages -d ../../build/web --repo https://github.com/my-name/my-metaplex -t true", -"deploy": "ASSET_PREFIX=/my-metaplex/ yarn build && yarn deploy:gh", +"deploy": "cross-env ASSET_PREFIX=/my-metaplex/ yarn build && yarn deploy:gh", ``` And after that, you can publish the Metaplex app to GitHub Pages by the following commands: diff --git a/js/packages/web/package.json b/js/packages/web/package.json index 94dc3f5..df7e388 100644 --- a/js/packages/web/package.json +++ b/js/packages/web/package.json @@ -4,11 +4,11 @@ "dependencies": { "@ant-design/icons": "^4.4.0", "@babel/preset-typescript": "^7.12.13", - "@solana/spl-name-service": "0.1.3", "@cloudflare/stream-react": "^1.1.0", "@oyster/common": "0.0.1", "@project-serum/serum": "^0.13.52", "@project-serum/sol-wallet-adapter": "^0.2.5", + "@solana/spl-name-service": "0.1.3", "@solana/spl-token": "0.1.6", "@solana/spl-token-registry": "^0.2.202", "@solana/wallet-base": "0.0.1", @@ -44,12 +44,12 @@ "prestart": "npm-link-shared ../common/node_modules/ . react", "start": "next dev", "build": "next build", - "export": "next export -o ../../build/web && touch ../../build/web/.nojekyll", + "export": "next export -o ../../build/web", "start:prod": "next start", "test": "jest", "deploy:ar": "yarn export && arweave deploy-dir ../../build/web --key-file ", "deploy:gh": "yarn export && gh-pages -d ../../build/web --repo https://github.com/metaplex-foundation/metaplex -t true", - "deploy": "ASSET_PREFIX=/metaplex/ yarn build && yarn deploy:gh", + "deploy": "cross-env ASSET_PREFIX=/metaplex/ yarn build && yarn deploy:gh", "format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\"" }, "eslintConfig": { @@ -86,6 +86,7 @@ "@types/testing-library__react": "^10.2.0", "@types/three": "^0.128.0", "arweave-deploy": "^1.9.1", + "cross-env": "^7.0.3", "gh-pages": "^3.1.0", "npm-link-shared": "0.5.6", "prettier": "^2.1.2", diff --git a/js/packages/web/public/.nojekyll b/js/packages/web/public/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/js/yarn.lock b/js/yarn.lock index 8846984..9c69d39 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -5422,6 +5422,13 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + cross-fetch@3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.6.tgz#3a4040bc8941e653e0e9cf17f29ebcd177d3365c" @@ -5448,7 +5455,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0: +cross-spawn@^7.0.0, cross-spawn@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==