Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"name": "@hawk.so/javascript",
"type": "commonjs",
"version": "3.2.11",
"private": true,
Copy link
Member

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.

"workspaces": [
"packages/*"
],
"description": "JavaScript errors tracking for Hawk.so",
"files": [
"dist"
Expand Down
3 changes: 3 additions & 0 deletions packages/svelte/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Hawk SDK for Svelte

This package is a wrapper around `@hawk.so/javascript` for better integration with SvelteKit applications.
Copy link
Member

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

14 changes: 14 additions & 0 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@hawk.so/svelte",
"version": "1.0.0",
"description": "Svelte/SvelteKit integration for hawk.javascript SDK",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Svelte/SvelteKit integration for hawk.javascript SDK",
"description": "Svelte/SvelteKit integration for Hawk Error Tracker",

"main": "./dist/hawk-svelte.umd.js",
"module": "./dist/hawk-svelte.mjs",
"types": "dist/index.d.ts",
"scripts": {
"build": "vite build"
},
"dependencies": {
"@hawk.so/javascript": "file:../.."
}
}
9 changes: 9 additions & 0 deletions packages/svelte/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @hawk.so/javascript-svelte
* Svelte/SvelteKit integration for Hawk.so JavaScript error tracker
*/

// Just verification that main sources may be used in current workspace
// TODO: should be replaced with actual code during further implementation
export * from '@hawk.so/javascript';
export { default } from '@hawk.so/javascript';
10 changes: 10 additions & 0 deletions packages/svelte/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": [
"src/**/*"
]
}
23 changes: 23 additions & 0 deletions packages/svelte/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import path from 'path';
import dts from 'vite-plugin-dts';
import { defineConfig } from 'vite';

export default defineConfig(() => {
return {
build: {
lib: {
entry: path.resolve(__dirname, 'src', 'index.ts'),
name: 'HawkSvelte',
fileName: 'hawk-svelte',
},
rollupOptions: {
external: ['svelte', '@hawk.so/javascript'],
},
},
plugins: [
dts({
tsconfigPath: './tsconfig.json',
}),
],
};
});
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"

"@hawk.so/javascript@file:.":
version "3.2.11"
dependencies:
"@hawk.so/types" "^0.1.36"
error-stack-parser "^2.1.4"
vite-plugin-dts "^4.2.4"

"@hawk.so/types@^0.1.36":
version "0.1.36"
resolved "https://registry.yarnpkg.com/@hawk.so/types/-/types-0.1.36.tgz#234b0e4c81bf5f50b1208910d45fc4ffb62e8ae1"
Expand Down
Loading