docs: add processStylexRules API documentation - #1445
Ankitsinghsisodya wants to merge 6 commits into
Conversation
|
@Ankitsinghsisodya is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive API documentation for the processStylexRules function exported from @stylexjs/babel-plugin, addressing issue #1061. This function is essential for developers building custom bundler integrations.
Changes:
- New documentation file explaining the
processStylexRulesAPI, including function signature, configuration options, and usage examples - Updated navigation to include link to the new documentation
- Updated meta.json to include the new page in the documentation structure
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/docs/content/docs/api/configuration/processStylexRules.mdx | Comprehensive documentation for processStylexRules API with examples and configuration options |
| packages/docs/content/docs/api/index.mdx | Added navigation link to processStylexRules documentation |
| packages/docs/content/docs/api/configuration/meta.json | Added processStylexRules.mdx to pages array for documentation structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@mellyeliu sir, I have done all the changes suggested by you. |
|
cc @mellyeliu |
This addresses issue facebook#1061 by documenting the processStylexRules API that is exported from @stylexjs/babel-plugin. The documentation covers: - Function purpose and usage - Function signature with TypeScript types - Configuration options (useLayers, enableLTRRTLComments, etc.) - Example for custom bundler integrations
Addresses review feedback: - Move documentation to babel-plugin README.md (for custom integrations) - Remove legacy Meta-internal options (enableLTRRTLComments, useLegacyClassnamesSort) - Delete standalone processStylexRules.mdx from docs site - Update navigation files (meta.json, index.mdx)
b3ec5e2 to
cc1911f
Compare
What changed / motivation?
Adds
processStylexRulesdocumentation to the Babel plugin README so custom bundler authors can collect rules from Babel metadata and generate CSS. Covers function usage and signature, processing steps,useLayersandlegacyDisableLayers, and a custom integration example. Also simplifies the existing Babel metadata example.Linked PR/Issues
Fixes #1061
Additional Context
Documentation-only change in
packages/@stylexjs/babel-plugin/README.md.Validation:
git diff --check origin/main...HEADpassed.Pre-flight checklist
Contribution Guidelines