Skip to content

Commit

Permalink
feat: try out sentry integration
Browse files Browse the repository at this point in the history
  • Loading branch information
setaman committed Aug 11, 2023
1 parent 03c3a5f commit f8646de
Show file tree
Hide file tree
Showing 9 changed files with 243 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ jobs:
run: npm ci

- name: Build VuePress site
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: yarn docs:build
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
run: npm ci

- name: Build VuePress site
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: yarn docs:build

# please check out the docs of the workflow for more details
Expand Down
12 changes: 12 additions & 0 deletions docs/.vuepress/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ import GapAnimation from "./theme/components/examples/gap/GapAnimation.vue";
import Dash from "./theme/components/examples/dash/Dash.vue";
import Dot from "./theme/components/examples/dot/Dot.vue";
import "@iconscout/unicons/css/line.css";
import * as Sentry from "@sentry/browser";

const components = [
Slider,
VEP,
Expand Down Expand Up @@ -90,4 +92,14 @@ export default defineClientConfig({
app.component(c.name ?? c.__name, c);
}
},
setup() {
const dsn = SENTRY_DSN;
if (dsn) {
Sentry.init({
dsn,
});
} else {
console.warn("Couldn't setup Sentry. DSN not provided!");
}
},
});
9 changes: 9 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { defaultTheme } from "vuepress";
import { searchPlugin } from "@vuepress/plugin-search";
import { viteBundler } from "vuepress";
import * as dotenv from "dotenv";

dotenv.config();

const isDevMode = process.env.NODE_ENV === "development";
const basePath = process.env.BASE_PATH || "/vue-ellipse-progress-docs/";
Expand All @@ -10,13 +13,19 @@ export default {
title: "vue-ellipse-progress",
description: "This is not my first VuePress site",
base: isDevMode ? "/" : basePath,
define: {
SENTRY_DSN: process.env.SENTRY_DSN,
},
markdown: {
code: {
lineNumbers: false,
},
},
bundler: viteBundler({
viteOptions: {
server: {
port: 8081,
},
ssr: {
noExternal: "@vueform/slider",
},
Expand Down
2 changes: 2 additions & 0 deletions docs/.vuepress/theme/components/Base/VEP.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
import { shallowRef, onMounted } from "vue";
const component = shallowRef(null);
onMounted(() =>
import("vue-ellipse-progress").then((module) => {
component.value = module.VeProgress;
throw new Error("Sentry Error");
})
);
</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/options/emptyLinePosition.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In general, this prop makes it possible to mimic the SVG2 `stroke-aligment`, whi

```vue
<ve-progress empty-line-position="in 10" />
<ve-progress empty-line-mode="out" />
<ve-progress empty-line-position="out" />
```

### Example
Expand Down
183 changes: 183 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@
},
"dependencies": {
"@iconscout/unicons": "^4.0.0",
"@sentry/browser": "^7.63.0",
"@sentry/vue": "^7.63.0",
"@vueform/slider": "^2.1.7",
"@vuepress/plugin-medium-zoom": "2.0.0-beta.66",
"dotenv": "^16.3.1",
"randomcolor": "^0.6.2",
"vite": "^4.4.7",
"vue-ellipse-progress": "^2.1.1"
Expand Down
29 changes: 29 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"

#Specify inspection profile for code analysis
profile:
name: qodana.starter

#Enable inspections
#include:
# - name: <SomeEnabledInspectionId>

#Disable inspections
#exclude:
# - name: <SomeDisabledInspectionId>
# paths:
# - <path/where/not/run/inspection>

#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
#bootstrap: sh ./prepare-qodana.sh

#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
#plugins:
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)

#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-jvm:latest

0 comments on commit f8646de

Please sign in to comment.