Skip to content

Commit

Permalink
build: Add local dev commands (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Nov 16, 2023
1 parent e4f59bb commit fcb780d
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 16 deletions.
14 changes: 4 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@

### Run Local Dev build

If you want to locally open two terminals
If you want to run this locally for development, you have to open two terminals and run the following commands:

One is for building & watching Spotlight locally.
1. Terminal 1: `pnpm dev:core`
2. Terminal 2: `pnpm dev:website`

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

The other is to run the website locally:

1. `cd packages/website`
2. `pnpm dev`
3. `open http://localhost:4321/spotlight`
Then you can find the website under http://localhost:4321/spotlight.

## Changesets

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"private": true,
"type": "module",
"scripts": {
"dev": "pnpm -r --parallel dev",
"build": "pnpm -r --parallel build",
"dev:core": "pnpm --filter core dev",
"dev:website": "pnpm --filter spotlight-website dev",
"build": "pnpm -r run build",
"preview": "pnpm -r run preview",
"lint": "eslint . --cache --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preinstall": "npx only-allow pnpm",
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/src/snippets.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export const SPOTLIGHT_CLIENT_INIT = `
import * as Spotlight from '@spotlightjs/astro';
import { init, sentry, console } from '@spotlightjs/astro';
Spotlight.init({
init({
integrations: [
Spotlight.sentry(),
Spotlight.console()
sentry(),
console()
],
showTriggerButton: false,
});
Expand Down
120 changes: 120 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fcb780d

Please sign in to comment.