replace "aqua-cli" command with "aqua"

This commit is contained in:
Pavel Murygin
2021-09-11 15:31:32 +03:00
parent 849d9bbd44
commit f2d9dc5d04
7 changed files with 72 additions and 327 deletions

View File

@ -2,7 +2,7 @@
## Basic concepts
The main export of the `@fluencelabs/fluence` package is the `FluencePeer` class. This class implements the Fluence protocol for javascript-based environments. It provides all the necessary features to communicate with Fluence network namely:
`@fluencelabs/fluence` package export the `FluencePeer` class. This class implements the Fluence protocol for javascript-based environments. It provides all the necessary features to communicate with Fluence network namely:
1. Connectivity with one or many Fluence Node which allows sending particles to and receiving from other Peers
2. The Peer Id identifying the node in the network
@ -31,10 +31,9 @@ To learn more about Aqua see [aqua book](https://doc.fluence.dev/aqua-book/)
The building block of the application are:
* Aqua code for peer-to-peer communication
* Compiler cli package for aqua to \(java\)typescript compilation
* Initialization of the `FluencePeer`
* Application specific code \(java\)typescript in the framework of your choice
- Aqua code for peer-to-peer communication
- Compiler cli package for aqua to \(java\)typescript compilation
- Initialization of the `FluencePeer`
- Application specific code \(java\)typescript in the framework of your choice
In the next section we see it in action

View File

@ -36,10 +36,8 @@ The first one is the SDK itself and the second is a maintained list of Fluence n
Aqua compiler cli has to be installed, but is not needed at runtime.
**Warning: the package requires java to be installed \(it will call "java -jar ... "\)**
```bash
npm install --save-dev @fluencelabs/aqua-cli
npm install --save-dev @fluencelabs/aqua
```
Also we might want to have aqua source files automatically recompiled on every save. We will take advantage of chokidar for that:
@ -76,7 +74,7 @@ The overall project structure looks like this:
The Aqua compiler can be run with `npm`:
```bash
npx aqua-cli -i ./aqua/ -o ./src/_aqua
npx aqua -i ./aqua/ -o ./src/_aqua
```
We recommend to store this logic inside a script in `packages.json` file:
@ -86,7 +84,7 @@ We recommend to store this logic inside a script in `packages.json` file:
...
"scripts": {
...
"compile-aqua": "aqua-cli -i ./aqua/ -o ./src/_aqua", // (1)
"compile-aqua": "aqua -i ./aqua/ -o ./src/_aqua", // (1)
"watch-aqua": "chokidar \"**/*.aqua\" -c \"npm run compile-aqua\"" // (2)
},
...
@ -142,4 +140,3 @@ node -r ts-node/register src/index.ts
If everything has been done correctly yuo should see `Hello, world!` in the console.
The next secion will cover in-depth and advanced usage JS SDK