-
Notifications
You must be signed in to change notification settings - Fork 4
Set up svelte package workspace #140
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
base: refactor/javascript-workspace
Are you sure you want to change the base?
Set up svelte package workspace #140
Conversation
packages/svelte/package.json
Outdated
| { | ||
| "name": "@hawk.so/svelte", | ||
| "version": "1.0.0", | ||
| "description": "Svelte/SvelteKit integration for hawk.javascript SDK", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "description": "Svelte/SvelteKit integration for hawk.javascript SDK", | |
| "description": "Svelte/SvelteKit integration for Hawk Error Tracker", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
packages/svelte/README.md
Outdated
| @@ -0,0 +1,3 @@ | |||
| # Hawk SDK for Svelte | |||
|
|
|||
| This package is a wrapper around `@hawk.so/javascript` for better integration with SvelteKit applications. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provide install & usage instructions instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| "name": "@hawk.so/javascript", | ||
| "type": "commonjs", | ||
| "version": "3.2.11", | ||
| "private": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that this is a correct options in current setup, because @hawk.so/javascript is not a private package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, seems like yarn requires this option:
https://github.com/codex-team/hawk.javascript/actions/runs/20316524303/job/58361497429?pr=140
5771ae4 to
c2abe1d
Compare
packages/svelte/src/index.ts
Outdated
| // Just verification that main sources may be used in current workspace | ||
| // TODO: should be replaced with actual code during further implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these docs still actual?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought there would be something else here to make Hawk work in svelte, but it looks like just HawkCatcher is enough, so I think these comments are no longer needed.
packages/svelte/src/index.ts
Outdated
| @@ -0,0 +1,9 @@ | |||
| /** | |||
| * @hawk.so/javascript-svelte | |||
| * Svelte/SvelteKit integration for Hawk.so JavaScript error tracker | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Svelte/SvelteKit integration for Hawk.so JavaScript error tracker | |
| * Svelte/SvelteKit integration for Hawk Error Tracker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
packages/svelte/package.json
Outdated
| "build": "vite build" | ||
| }, | ||
| "dependencies": { | ||
| "@hawk.so/javascript": "file:../.." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems strange, is it production ready?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the new version is ok?
packages/svelte/README.md
Outdated
| @@ -0,0 +1,23 @@ | |||
| # Hawk JavaScript Catcher: Svelte Integration | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Hawk JavaScript Catcher: Svelte Integration | |
| # Hawk SDK for Svelte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
packages/svelte/README.md
Outdated
| Install package: | ||
|
|
||
| ```shell | ||
| npm install @hawk.so/javascript --save |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not @hawk.so/svelte?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, changed to suggested variant.
packages/svelte/README.md
Outdated
|
|
||
| ## Usage | ||
|
|
||
| Install package: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Install package: | |
| **1. Install package:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
packages/svelte/README.md
Outdated
|
|
||
| Svelte is supported out of the box. Initialize HawkCatcher in app's client hooks. | ||
|
|
||
| Create or update `src/hooks.client.ts`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Create or update `src/hooks.client.ts`: | |
| **2. Create or update `src/hooks.client.ts`:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
packages/svelte/README.md
Outdated
| Create or update `src/hooks.client.ts`: | ||
|
|
||
| ```ts | ||
| import HawkCatcher from '@hawk.so/javascript'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
| import HawkCatcher from '@hawk.so/javascript'; | |
| import Hawk from '@hawk.so/svelte'; | |
| new Hawk({...}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
packages/svelte/vite.config.ts
Outdated
| build: { | ||
| lib: { | ||
| entry: path.resolve(__dirname, 'src', 'index.ts'), | ||
| name: 'HawkSvelte', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| name: 'HawkSvelte', | |
| name: 'Hawk', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
5ea753a to
46191a0
Compare
7423619 to
38bf990
Compare
- Create packages/svelte with TypeScript and Vite configuration - Configure workspace - Add minimal package structure with build support
46191a0 to
9fe6394
Compare
Closes #136
Created and configured
packages/svelteworkspace as module for implementing Svelte integration utilities in future.