-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from polywrap/nerfzael-features-and-fixes
JS wraps with shims, aliasing urls and readme updates
- Loading branch information
Showing
20 changed files
with
2,879 additions
and
113 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# PWR App Examples | ||
|
||
- [Simple PWR App](../examples/simple-pwr-app/README.md) | ||
- [Simple Storage App](../examples/simple-storage-app/README.md) | ||
- [HTTP Server App](../examples/http-server-app/README.md) | ||
- [Advanced HTTP Server App](../examples/app-with-ui/README.md) | ||
- [PWR App with UI](../examples/app-with-ui/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Example PWR CLI usage: | ||
|
||
## Migration | ||
After running `pwrup`, you have to run `pwr migrate` to migrate your configuration to the latest version. | ||
|
||
## Running pwr apps | ||
|
||
### From wrapscan.io | ||
To run a pwr app from wrapscan.io, run: | ||
```bash | ||
pwr wrapscan.io/pwr/say-hello | ||
``` | ||
|
||
### From wrappers.dev | ||
To run a pwr app from wrappers.dev, run: | ||
```bash | ||
pwr @pwr/say-hello | ||
``` | ||
```bash | ||
pwr https/wrappers.dev/u/pwr/say-hello | ||
``` | ||
|
||
### Local directory | ||
To run a pwr app from a local directory (e.g. `./build`), run: | ||
```bash | ||
pwr ./build | ||
``` | ||
```bash | ||
pwr fs/build | ||
``` | ||
|
||
### From IPFS | ||
To run a pwr app from IPFS, run: | ||
```bash | ||
pwr ipfs/Qm... | ||
``` | ||
```bash | ||
pwr Qm... | ||
``` | ||
```bash | ||
pwr ipfs://Qm... | ||
``` | ||
|
||
### From ENS | ||
To run a pwr app from ENS, run: | ||
```bash | ||
pwr ens/say-hello.eth | ||
``` | ||
```bash | ||
pwr say-hello.eth | ||
``` | ||
|
||
## Passing arguments to pwr apps | ||
To pass arguments to a pwr app add them after the WRAP URI, e.g.: | ||
```bash | ||
pwr ./build arg1 arg2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Script WRAPS (JS and Python) | ||
{lang} = js | py | ||
|
||
### REPL | ||
`pwr {lang} repl` | ||
Runs a REPL where you can type scripts. | ||
|
||
`pwr {lang} repl -f {name_of_file}` | ||
Runs the repl over a file. | ||
It will read and execute the file first (and create it if it doesn't exist). | ||
It will also store all CLI commands you type inside of it (after evaluating them). | ||
Press enter in the CLI to re-run the whole file (useful if you want to code in the file instead of the CLI). | ||
|
||
`pwr {lang} repl -f {name_of_file} -w` | ||
It will read and execute the file first (and create it if it doesn't exist). | ||
Then it will execute the file every time you save it. | ||
It will not listen to CLI input if you use this option ("-w"). | ||
|
||
### New | ||
`pwr {lang} new -f {name_of_file}` | ||
Creates a new file of the specified name for the script wrap. | ||
It uses a template for that language. | ||
|
||
### Build | ||
`pwr {lang} build -f {name_of_file}` | ||
Builds the target script file. | ||
|
||
### Deploy | ||
`pwr deploy` | ||
Deploys the build directory. | ||
|
||
`pwr {lang} deploy` | ||
Deploys the build directory. (Same as `pwr deploy`) | ||
|
||
`pwr {lang} deploy -f {name_of_file}` | ||
Builds and then deploys the script file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.