Skip to content

Commit

Permalink
docs: Update readmes (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea authored Nov 14, 2023
1 parent 5e71706 commit 368582b
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 19 deletions.
6 changes: 6 additions & 0 deletions .changeset/nervous-ghosts-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@spotlightjs/core': patch
'@spotlightjs/sidecar': patch
---

Update README
44 changes: 44 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Contributing to Spotlight

## Local Setup

- `pnpm install`
- `pnpm build`

### Run Local Dev build

If you want to locally open two terminals

One is for building & watching Spotlight locally.

1. `cd packages/spotlight`
2. `pnpm dev`

The other is to run the website locally:

1. `cd packages/website`
2. `pnpm dev`
3. `open http://localhost:4321/spotlight`

## Changesets

Spotlight uses [Changesets](https://github.com/changesets/changesets) to track changes & versions.

Whenever you make a change that is users facing, you should add a changeset to your PR. You can do this by runing the
following command:

```bash
onpm changeset:add
```

This will guide you through the process to define the changeset. You have to select which package(s) are affected by
this change, if it is a patch/minor/major change, and provide a description for the change.

Note that not all PRs need a changeset (e.g. if you only write docs), and a PR can also have more than one changeset.

## Publishing

When you want to publish a new version, you need to trigger the
[Prepare Publish](https://github.com/getsentry/spotlight/actions/workflows/prepare-publish.yml) Github Action. This
action will open a PR with all versions bumped & changelogs updated according to the currently pending changesets. If
you approve & merge this PR, these versions will automatically be published to NPM.
20 changes: 1 addition & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,7 @@ overlay into development environments, and it does it by leveraging the existing

## Contributing / Running the repo

This repo is power by `pnpm`

1. `pnpm install`
2. `pnpm build`

### Run Local Dev build

If you want to locally open two terminals

One is for building & watching Spotlight locally.

1. `cd packages/spotlight`
2. `pnpm dev`

The other is to run the website locally:

1. `cd packages/website`
2. `pnpm dev`
3. `open http://localhost:4321/spotlight`
See [CONTIBUTING.md](./CONTRIBUTING.md) for how to contribute and develop Spotlight.

## More on Architecture

Expand Down
18 changes: 18 additions & 0 deletions packages/sidecar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Spotlight Sidecar

The Spotlight Sidecar is a small proxy server that allows (development) servers to send data to Spotlight.

## Installation

```js
npm install @spotlightjs/sidecar
```

## Usage

```js
import { setupSidecar } from '@spotlightjs/sidecar';

// When you start your dev server
setupSidecar();
```
20 changes: 20 additions & 0 deletions packages/spotlight/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Spotlight Core

This is the core package to add Spotlight to your application

## Installation

```js
npm install @spotlightjs/core
```

## Usage

```js
import * as Spotlight from '@spotlightjs/core';

Spotlight.init({
integrations: [Spotlight.sentry(), Spotlight.console()],
showTriggerButton: true,
});
```

0 comments on commit 368582b

Please sign in to comment.