Skip to content

Commit 39022f7

Browse files
committed
Alter docs
1 parent e0653a4 commit 39022f7

File tree

1 file changed

+41
-17
lines changed
  • packages/homepage/content/docs

1 file changed

+41
-17
lines changed

packages/homepage/content/docs/8-ci.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,56 @@
22
title: CI
33
authors: ['Ives van Hoorne']
44
description:
5-
Here's what CodeSandbox CI is, how it will benefit you as a library maintainer, and how to set it up for your library.
5+
Here's what CodeSandbox CI is, how it will benefit you as a library
6+
maintainer, and how to set it up for your library.
67
---
78

89
## What is CodeSandbox CI?
910

10-
CodeSandbox CI is a [GitHub app](https://github.com/apps/codesandbox) that you can install in your repository. The app is responsible for building your library. Whenever a Pull Request is opened it builds a version of the library from that PR. This is published to our registry, so you can immediately test the library in CodeSandbox or locally without publishing to nom or elsewhere.
11-
12-
While Client Sandboxes have faster previews and offline availability, they lack
13-
in configurability. Container Sandboxes take longer to start up, but effectively
14-
behave much like a local development environment, allowing you to customize your
15-
build tools, set up servers to listen to incoming requests, etc.
11+
CodeSandbox CI is a [GitHub app](https://github.com/apps/codesandbox) that you
12+
can install in your repository. The app is responsible for building your
13+
library. Whenever a Pull Request is opened it builds a version of the library
14+
from that PR. This is published to our registry, so you can immediately test the
15+
library in CodeSandbox or locally without publishing to nom or elsewhere.
1616

1717
## Why do I want this?
1818

19-
The goal of this app is to make it easier for you to test your library without publishing to npm yet. Since CodeSandbox is already used for bug reports we wanted to make it possible to also test the PR version of your library with the existing bug reports.
19+
The goal of this app is to make it easier for you to test your library without
20+
publishing to npm yet. Since CodeSandbox is already used for bug reports we
21+
wanted to make it possible to also test the PR version of your library with the
22+
existing bug reports.
2023

2124
## How does it work?
25+
2226
A typical workflow might look like this:
27+
2328
- Someone opens an issue for a bug with a sandbox reproducible
2429
- Someone opens a fix PR mentioning the issue
25-
- We build the library from the PR, fork the sandbox repro and install the new library in that sandbox.
26-
This way you will only have to open the generated sandbox to confirm that the fix works with no need to clone, install or test locally.
30+
- We build the library from the PR, fork the sandbox repro and install the new
31+
library in that sandbox. This way you will only have to open the generated
32+
sandbox to confirm that the fix works with no need to clone, install or test
33+
locally.
2734

2835
## How do I set this up?
29-
For most libraries, the only thing you need to do is install this [GitHub App](https://github.com/apps/codesandbox). In some cases you might need to do some configuration, an example of this is for monorepos. You can configure your library by creating a file called `ci.json` in a folder called `.codesandbox` (`.codesandbox/ci.json`) in the root of your repo. An example PR can be found [here](https://github.com/facebook/react/pull/17175).
36+
37+
For most libraries, the only thing you need to do is install this
38+
[GitHub App](https://github.com/apps/codesandbox). In some cases you might need
39+
to do some configuration, an example of this is for monorepos. You can configure
40+
your library by creating a file called `ci.json` in a folder called
41+
`.codesandbox` (`.codesandbox/ci.json`) in the root of your repo. An example PR
42+
can be found [here](https://github.com/facebook/react/pull/17175).
3043

3144
## Configuration
32-
You can configure how your projects build on CodeSandbox CI by creating a file called `ci.json` in a folder called `.codesandbox` in the root of your repository.
45+
46+
You can configure how your projects build on CodeSandbox CI by creating a file
47+
called `ci.json` in a folder called `.codesandbox` in the root of your
48+
repository.
3349

3450
### Configuration Format
51+
3552
These are all the configuration options you can set. They are all optional.
3653

37-
```
54+
```json
3855
{
3956
// which script in package.json to run to install instead of `npm ci` or `yarn install`,
4057
// can be `false` if you want to skip this step
@@ -62,12 +79,19 @@ These are all the configuration options you can set. They are all optional.
6279
```
6380

6481
### Monorepo Example
82+
6583
Monorepos are quite common, here's an example configuration for a monorepo:
66-
```
84+
85+
```json
6786
{
68-
"packages": ["./", "packages/vue-template-compiler"],
87+
"packages": ["./", "packages/vue-template-compiler"]
6988
}
7089
```
71-
This builds two libraries: `vue`, which is in the root of the repository, and `vue-template-compiler`, which resides in the `packages` folder.
7290

73-
We handle auto linking of these dependencies, this means that we rewrite the dependencies to the newly built versions of CodeSandbox CI. In this example, `vue` uses `vue-template-compiler`, so we've updated `package.json` of `vue` to point to our built `vue-template-compiler`.
91+
This builds two libraries: `vue`, which is in the root of the repository, and
92+
`vue-template-compiler`, which resides in the `packages` folder.
93+
94+
We handle auto linking of these dependencies, this means that we rewrite the
95+
dependencies to the newly built versions of CodeSandbox CI. In this example,
96+
`vue` uses `vue-template-compiler`, so we've updated `package.json` of `vue` to
97+
point to our built `vue-template-compiler`.

0 commit comments

Comments
 (0)