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', }; 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; + } });