Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ts-web/core: docs additions (hosed version) #1163

Merged
merged 2 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions client-sdk/ts-web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Outer workspace for packages

This directory is an
[npm workspace](https://docs.npmjs.com/cli/v8/using-npm/workspaces) that helps
us link the contained packages into each other's dependencies.

## Building the packages

In this directory, run:

```sh
npm i --foreground-scripts
```

The `--foreground-scripts` option instructs npm to compile (TypeScript)
depended-on packages before compiling packages that depend on them.
[Tracked](https://github.com/npm/cli/issues/4100).
2 changes: 1 addition & 1 deletion client-sdk/ts-web/core/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# An oasis-core SDK for TypeScript

Developers, see [this getting started guide](docs/getting-started.md).
Users of this package, see [this getting started guide](docs/getting-started.md).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already had a link to a sample envoy configuration. clarifying this link to indicate that users of this package should see the guide there


## Philosophy

Expand Down
10 changes: 9 additions & 1 deletion client-sdk/ts-web/core/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ npm install @oasisprotocol/client@alpha
```

Install this package [from
npm](https://www.npmjs.com/package/@oasisprotocol/client).
npm](https://www.npmjs.com/package/@oasisprotocol/client?activeTab=versions).
The `@alpha` is needed because we are publishing to the `alpha` tag.
Due to technical limitations, npm has also created a `latest` tag which is
stuck at a very old alpha verison.

**TODO: Update this command when this library gets out of alpha.**

Expand All @@ -33,6 +36,11 @@ For security and performance reasons, some methods are not permitted.
See the Advanced deployment section below for how to set up your own node with
a custom set of enabled methods.

## Running in Node.js

This package and some of its dependencies do not support running in Node.js.
Only use this package in browsers.
Copy link
Contributor Author

@pro-wh pro-wh Oct 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we downgrade this statement to "Running this in Node.js may be possible with fallback implementations of browser APIs, but we do not have guidance on configuring this"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has it been tested to work? If yes, we could downgrade, otherwise just leave as-is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. only that there are some unit tests we run in node


# Example code

We have [a few sample interactions](../playground/src/index.js).
Expand Down