Browse Source

WIP - install docz https://www.docz.site/

Ryan Albrecht 1 year ago
parent
commit
e05b6578f0
9 changed files with 702 additions and 16 deletions
  1. 5 0
      doczrc.js
  2. 1 1
      .envrc
  3. 1 0
      .gitignore
  4. 5 5
      README.md
  5. 46 0
      gatsby-node.ts
  6. 3 1
      package.json
  7. 3 3
      src/sentry/replays/blueprints/api.md
  8. 17 0
      static/app/components/count.mdx
  9. 621 6
      yarn.lock

+ 5 - 0
doczrc.js

@@ -0,0 +1,5 @@
+export default {
+  src: './static',
+  files: '**/*.story.mdx',
+  typescript: true,
+};

+ 1 - 1
.envrc

@@ -123,7 +123,7 @@ unset PYTHONPATH
 export PIP_DISABLE_PIP_VERSION_CHECK=on
 
 # increase node's memory limit, required for our webpacking
-export NODE_OPTIONS=--max-old-space-size=4096
+export NODE_OPTIONS='--max-old-space-size=4096 --openssl-legacy-provider'
 
 # Frontend hot module reloader using `react-refresh`
 # Enable this by default for development envs (CI/deploys do not use envrc)

+ 1 - 0
.gitignore

@@ -1,6 +1,7 @@
 .env
 .cache/
 .coverage*
+.docz
 .DS_Store
 .venv
 *.egg-info

+ 5 - 5
README.md

@@ -1,7 +1,7 @@
 <p align="center">
   <p align="center">
     <a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
-      <img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
+      <img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84" />
     </a>
   </p>
   <p align="center">
@@ -16,10 +16,10 @@ Sentry is a developer-first error tracking and performance monitoring platform t
 
 
 <p align="center">
-  <img src="https://github.com/getsentry/sentry/raw/master/.github/screenshots/projects.png" width="270">
-  <img src="https://github.com/getsentry/sentry/raw/master/.github/screenshots/issue-details.png" width="270">
-  <img src="https://github.com/getsentry/sentry/raw/master/.github/screenshots/transaction-summary.png" width="270">
-  <img src="https://github.com/getsentry/sentry/raw/master/.github/screenshots/releases.png" width="270">
+  <img src="https://github.com/getsentry/sentry/raw/master/.github/screenshots/projects.png" width="270" />
+  <img src="https://github.com/getsentry/sentry/raw/master/.github/screenshots/issue-details.png" width="270" />
+  <img src="https://github.com/getsentry/sentry/raw/master/.github/screenshots/transaction-summary.png" width="270" />
+  <img src="https://github.com/getsentry/sentry/raw/master/.github/screenshots/releases.png" width="270" />
 </p>
 
 ## Official Sentry SDKs

+ 46 - 0
gatsby-node.ts

@@ -0,0 +1,46 @@
+const path = require('path');
+
+exports.onCreateWebpackConfig = ({ actions, loaders, getConfig }) => {
+  // const webpackConfig = require('./webpack.config');
+  // const babelConfig = require('./babel.config');
+
+  // console.log({wp});
+
+  // actions.setWebpackConfig(webpackConfig);
+
+  const staticPrefix = path.join(__dirname, 'static');
+  const sentryDjangoAppPath = path.join(__dirname, 'src/sentry/static/sentry');
+
+  console.log({
+    staticPrefix,
+    sentryDjangoAppPath,
+  });
+
+  actions.setWebpackConfig({
+    resolve: {
+      // ⚠ Note the '..' in the path because the docz gatsby project lives in the `.docz` directory
+      modules: ['node_modules'],
+      alias: {
+        'react-dom$': 'react-dom/profiling',
+        'scheduler/tracing': 'scheduler/tracing-profiling',
+        sentry: path.join(staticPrefix, 'app'),
+        'sentry-images': path.join(staticPrefix, 'images'),
+        'sentry-logos': path.join(sentryDjangoAppPath, 'images', 'logos'),
+        'sentry-fonts': path.join(staticPrefix, 'fonts'),
+
+        // Aliasing this for getsentry's build, otherwise `less/select2` will not be able
+        // to be resolved
+        less: path.join(staticPrefix, 'less'),
+        'sentry-test': path.join(__dirname, 'tests', 'js', 'sentry-test'),
+        'sentry-locale': path.join(__dirname, 'src', 'sentry', 'locale'),
+        'ios-device-list': path.join(
+          __dirname,
+          'node_modules',
+          'ios-device-list',
+          'dist',
+          'ios-device-list.min.js'
+        ),
+      },
+    },
+  });
+};

+ 3 - 1
package.json

@@ -183,6 +183,7 @@
     "babel-jest": "^29.4.1",
     "babel-plugin-dynamic-import-node": "^2.3.3",
     "benchmark": "^2.1.4",
+    "docz": "^2.4.0",
     "eslint": "8.44.0",
     "eslint-config-sentry-app": "1.119.0",
     "html-webpack-plugin": "^5.5.0",
@@ -213,7 +214,8 @@
     "**/@sentry/core": "^7.59.0-beta.0",
     "**/@sentry/types": "^7.59.0-beta.0",
     "**/@sentry/utils": "^7.59.0-beta.0",
-    "**/ua-parser-js": "<=0.7.28"
+    "**/ua-parser-js": "<=0.7.28",
+    "remark-mdx": "1.6.22"
   },
   "APIMethod": "stub",
   "proxyURL": "http://localhost:8000",

+ 3 - 3
src/sentry/replays/blueprints/api.md

@@ -320,7 +320,7 @@ With download query argument.
 
   Content-Type application/octet-stream
 
-## Replay Tag Keys [/projects/<organization_slug>/<project_slug>/replays/tags/]
+## Replay Tag Keys [/projects/\<organization_slug\>/\<project_slug\>/replays/tags/]
 
 ### Fetch Tag Keys [GET]
 
@@ -344,7 +344,7 @@ Retrieve a collection of tag keys associated with the replays dataset.
   ]
   ```
 
-## Replay Tag Values [/projects/<organization_slug>/<project_slug>/replays/tags/<key>/values/]
+## Replay Tag Values [/projects/<organization_slug>/<project_slug>/replays/tags/\<key\>/values/]
 
 ### Fetch Tag Values [GET]
 
@@ -374,7 +374,7 @@ Retrieve a collection of tag values associated with a tag key on the replays dat
   ]
   ```
 
-## Replay Click [/projects/<organization_slug>/<project_slug>/replays/<replay_id>/clicks/]
+## Replay Click [/projects/\<organization_slug\>/\<project_slug\>/replays/\<replay_id\>/clicks/]
 
 Parameters:
 

+ 17 - 0
static/app/components/count.mdx

@@ -0,0 +1,17 @@
+---
+name: Button
+route: /
+---
+
+import { Playground, Props } from 'docz'
+import { Count } from './count'
+
+# Button
+
+<Props of={Button} />
+
+## Basic usage
+
+<Playground>
+  <Count value={15} />
+</Playground>

File diff suppressed because it is too large
+ 621 - 6
yarn.lock


Some files were not shown because too many files changed in this diff