From ba7ac6ad20a9c7e7b11f801aad91ac5b33128743 Mon Sep 17 00:00:00 2001 From: Lucas Araujo Date: Tue, 5 Dec 2023 14:47:11 -0300 Subject: [PATCH 1/2] add necessary step for build to readme file --- README.md | 12 ++++++++++-- secrets.testing.js | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3585627c..10fae61f 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ Nami is a browser based wallet extension to interact with the Cardano blockchain. It's an open-source project and built by [**Berry Pool**](https://pipool.online). - ### Testnet [Download testnet version](./build.zip) @@ -213,7 +212,12 @@ The `project_id` for API requests can be created under [blockfrost.io](https://b **Recommended:** Follow this [approach](https://github.com/lxieyang/chrome-extension-boilerplate-react#secrets) in order to keep the keys seperate from the repository. -The quick solution is to go under `./src/config/provider.js` and replace `secrets.PROJECT_ID_MAINNET` and `secrets.PROJECT_ID_TESTNET` with the project ids from blockfrost. +``` +# Update secrets file with your own keys +cp secrets.testing.js secrets.development.js +``` + +The quick solution is to go under `./src/config/provider.js` and replace `secrets.PROJECT_ID_MAINNET`, `secrets.PROJECT_ID_TESTNET`, `secrets.PROJECT_ID_PREVIEW` and `secrets.PROJECT_ID_PREPROD` with the project ids from blockfrost. ##### Requirements @@ -222,12 +226,16 @@ The quick solution is to go under `./src/config/provider.js` and replace `secret ##### Start development server ``` +# Update secrets file with your own keys +cp secrets.testing.js secrets.development.js npm start ``` ##### Create production build ``` +# Update secrets file with your own keys +cp secrets.testing.js secrets.production.js npm run build ``` diff --git a/secrets.testing.js b/secrets.testing.js index 52eec056..c27a809e 100644 --- a/secrets.testing.js +++ b/secrets.testing.js @@ -1,4 +1,6 @@ export default { PROJECT_ID_MAINNET: 'DUMMY_MAINNET', PROJECT_ID_TESTNET: 'DUMMY_TESTNET', + PROJECT_ID_PREVIEW: 'DUMMY_PREVIEW', + PROJECT_ID_PREPROD: 'DUMMY_PREPROD', }; From edef1fcde0e2f1cbb2e178430fcf844c9aa2b748 Mon Sep 17 00:00:00 2001 From: Lucas Araujo Date: Tue, 5 Dec 2023 15:38:58 -0300 Subject: [PATCH 2/2] log build erros --- utils/build.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/utils/build.js b/utils/build.js index 12b0d5eb..75bf38ff 100755 --- a/utils/build.js +++ b/utils/build.js @@ -10,6 +10,16 @@ delete config.chromeExtensionBoilerplate; config.mode = 'production'; -webpack(config, function (err) { - if (err) throw err; +webpack(config, function (err, stats) { + if (stats.hasErrors()) { + console.log( + stats.toString({ + colors: true, + }) + ); + } + + if (err) { + throw err; + } });