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

docs: fix typos #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ const tree = {
contents: 'const x = 1;',
},
},
.envrc: {
'.envrc': {
file: {
contents: 'ENVIRONMENT=staging'
}
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ This page provides the bare-minimum overview on how to start building with WebCo
We have prepared a [step-by-step walkthrough](../tutorial/1-build-your-first-webcontainer-app) for you!
:::

**The WebContainer API starter is the fastest way to explore the API**. Open it in StackBlitz editor:
**The WebContainer API starter is the fastest way to explore the API**. Open it in StackBlitz editor:
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://webcontainer.new)

or in Codeflow IDE, our full-fledged web environment:
or in Codeflow IDE, our full-fledged web environment:
[![Open in Codeflow](https://developer.stackblitz.com/img/open_in_codeflow.svg)](https:///pr.new/github.com/stackblitz/webcontainer-api-starter)

If you prefer to develop locally, follow the steps below.
Expand Down Expand Up @@ -100,7 +100,7 @@ async function startDevServer() {

## 4. Preview

After you have started the dev server, get the URL from `port-ready` event and mount it in an iframe:
After you have started the dev server, get the URL from `server-ready` event and mount it in an iframe:

```js
webcontainerInstance.on('server-ready', (port, url) => (iframeEl.src = url));
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/running-processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Calling `spawn` returns a `WebContainerProcess`. Every process has an `output` p

The output property is a `ReadableStream`. That’s because it is, in fact, a stream that can emit strings numerous times, just like the actual `stdout` or `stderr` from a process in Node.js. The advantage of streams is that they allow composition, meaning we can pipe data from one stream into another stream, for example `source.pipeTo(destination)`. Furthermore, streams can be transferred via `postMessage` from one context to a different context, for example a web worker. A `ReadableStream` also keeps a buffer of the data which is only flushed once you start reading.

If you want to read data from output you can pipe it into a `WriteableStream` just like in the example above.
If you want to read data from output you can pipe it into a `WriteableStream` just like in the example below.

:::

Expand All @@ -61,7 +61,7 @@ An example of a usage could be the following:

```js
const installProcess = await webcontainerInstance.spawn('npm', ['install']);

installProcess.output.pipeTo(new WritableStream({
write(data) {
console.log(data);
Expand Down