-
Notifications
You must be signed in to change notification settings - Fork 1
Run code
Guillem Puche edited this page Aug 28, 2022
·
2 revisions
Follow the next steps to install all the necessary software:
- Install an IDE (a software to open the code). We recommend Visual Studio Code. If you don't want to install anything on your computer, you can use Gitpod or Stackblitz; if you do so, you don't need to do the next steps.
- Install NodeJS version 16 or later. There are two ways of installing it:
- [Easiest] Install only NodeJS version downloading from https://nodejs.org/en/download/.
- [Recommended] Having multiple NodeJS versions and switching between them with Node Version Manager or NVM.
- Download the Skia Wallet's code on a folder of your computer. Open the terminal and go to your choosen directory and run
git clone https://github.com/Future-Wallet/skia-wallet.git
. - Via terminal, go inside the new folder called running
cd skia-wallet/
and install the dependencies withnpm install
ornpm i
. - Install on your computer Nx with
npm i -g nx
.
- Open your terminal and go to the main directory (the folder where you have the Skia Wallet's code). It sould have the name
skia-wallet
. - Run
nx run ui-wallet:serve
. Nx should be running the website. - Open this URL
http://localhost:4200/
on your browser, a
If you want to test part of the code located in the core layers (in the packages called common
, entities
and repositories
), it could be difficult, because it's used on outside layers (learn more about layers here).
To make your life easy, you have two ways:
- [Work in progress][Recommended] Via tests
- Via NPM. Steps:
- Create a file in any choosen package/layer. It needs to be:
- inside the folder
src
that each package already has. - File name
_dev.ts
or__dev.ts
. - Eg. File name
_dev.ts
located on the pathpackages/repositories/src/_dev.ts
.
- inside the folder
- Add a NPM command in the main
package.json
of the choosen package. Eg. located onpackages/repositories/package.json
- Create a file in any choosen package/layer. It needs to be:
...
"name": "@skiawallet/repositories",
"scripts": {
...
"dev": "ts-node src/_dev.ts"
}
...
- Open your terminal on the root folder of Skia Wallet code and run the command using Nx. Eg.
nx <new_npm_command> <choosen_package>
. Eg.nx dev repositories
)
Nx ecosystem provides many plugins. Here are the ones you could find useful:
- The plugin and command
@nrwl/workspace
for renaming, moving, removing... the packages. More info here.