Skip to content

Commit

Permalink
Merge pull request #844 from Sonia-corporation/feature/vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
C0ZEN authored Aug 24, 2022
2 parents f15a8d3 + b221ce4 commit 6eef1a8
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .idea/jsLibraryMappings.xml

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

14 changes: 14 additions & 0 deletions .idea/libraries/docusaurus.xml

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

14 changes: 14 additions & 0 deletions .idea/libraries/sentry.xml

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

2 changes: 2 additions & 0 deletions documentation/docusaurus.vercel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const config = require(`./docusaurus.core.config.js`);

config.clientModules = [require.resolve(`./src/modules/sentry.module.ts`)];

module.exports = config;
194 changes: 194 additions & 0 deletions documentation/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 documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start --config docusaurus.github.config.js ",
"start:vercel": "docusaurus start --config docusaurus.vercel.config.js ",
"start:french": "npm run start -- --locale fr",
"build": "npm run generate-files && docusaurus build --config docusaurus.github.config.js",
"build:vercel": "npm run generate-files && docusaurus build --config docusaurus.vercel.config.js",
Expand All @@ -29,6 +30,8 @@
"@docusaurus/preset-classic": "2.0.1",
"@docusaurus/theme-search-algolia": "2.0.1",
"@mdx-js/react": "1.6.22",
"@sentry/browser": "7.11.1",
"@sentry/tracing": "7.11.1",
"clsx": "1.2.1",
"prism-react-renderer": "1.3.5",
"react": "17.0.2",
Expand Down
18 changes: 18 additions & 0 deletions documentation/src/modules/sentry.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// eslint-disable-next-line import/no-unresolved
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
import * as Sentry from '@sentry/browser';
import { BrowserTracing } from '@sentry/tracing';

console.debug(`Sentry module initialized`);

if (ExecutionEnvironment.canUseDOM) {
console.debug(`Initializing Sentry...`);

Sentry.init({
dsn: `https://3e75b18963924b688011fda3e2b75f4e@o1376500.ingest.sentry.io/6685609`,
integrations: [new BrowserTracing()],
tracesSampleRate: 1.0,
});

console.debug(`Sentry initialized`);
}
6 changes: 5 additions & 1 deletion documentation/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"node_modules/@types/",
"types",
"documentation/node_modules/@types",
"documentation/node_modules/@types/"
"documentation/node_modules/@types/",
"documentation/node_modules/@docusaurus",
"documentation/node_modules/@docusaurus/",
"documentation/node_modules/@sentry",
"documentation/node_modules/@sentry/"
],
"baseUrl": ".",
"rootDir": ".",
Expand Down

0 comments on commit 6eef1a8

Please sign in to comment.