Skip to content
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

docs: scan for component default scss vars #1172

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

whiplashwebb
Copy link
Contributor

@whiplashwebb whiplashwebb commented Jan 31, 2025

Proposed Changes

In order to support oruga-ui/theme-bulma#154 we need to add a secondary mechanism for pulling scss variables from our files, as defaults can no longer be stored with the bulk of the scss for a given component after recent Bulma changes. This change allows the docs to scan /scss/component-defaults/* in addition to /scss/components/* and merge the results together.

I have tested this change with the current version of theme bulma and with the updated version of theme bulma. Both versions function as expected, so we should be able to merge this PR prior to the theme PR merging. Other themes are unaffected by this change, although they can opt-in to this pattern if needed.

This change only affects documentation and contains no changes to components etc.

Copy link

netlify bot commented Jan 31, 2025

Deploy Preview for oruga-documentation-preview ready!

Name Link
🔨 Latest commit a8624ec
🔍 Latest deploy log https://app.netlify.com/sites/oruga-documentation-preview/deploys/679d2678872fee0008920cfb
😎 Deploy Preview https://deploy-preview-1172--oruga-documentation-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mlmoravek mlmoravek added the enhancement Improvements to existing features and functionality label Jan 31, 2025
@mlmoravek mlmoravek changed the title Docs: Scan for component default scss vars docs: scan for component default scss vars Jan 31, 2025
@@ -3,6 +3,20 @@ import * as fs from "fs";
import { type SafeDocgenCLIConfig } from "vue-docgen-cli/lib/config";
import { getThemePath, Themes, type ThemeConfig } from "../themes-helper";

export const docsRegex = "/* @docs */";

export function getVariablesFromContent(content: string) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to export this function and de docsRegex?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features and functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants