-
-
Notifications
You must be signed in to change notification settings - Fork 98
docs: add descriptions to plugin READMEs #596
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,25 @@ | ||
| # @swc/plugin-jest | ||
|
|
||
| The SWC implementation of `babel-jest`. This plugin transforms test files using SWC, enabling fast Jest-based testing without Babel. It replaces `babel-jest` as the transformer in Jest configurations and supports TypeScript, JSX, and modern JavaScript features. | ||
|
|
||
| ## Usage | ||
|
|
||
| Install the plugin and configure Jest to use SWC as the transformer: | ||
|
|
||
| ```sh | ||
| npm install --save-dev @swc/plugin-jest @swc/jest @swc/core | ||
| ``` | ||
|
|
||
| Then update your Jest configuration (e.g. `jest.config.js`): | ||
|
|
||
| ```js | ||
| module.exports = { | ||
| transform: { | ||
| "^.+\\.(t|j)sx?$": "@swc/jest", | ||
|
Comment on lines
+15
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This example swaps Jest over to Useful? React with 👍 / 👎. |
||
| }, | ||
| }; | ||
| ``` | ||
|
|
||
| # @swc/plugin-jest | ||
|
|
||
| ## 12.7.0 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,23 @@ | ||
| # @swc/plugin-styled-jsx | ||
|
|
||
| SWC plugin for [styled-jsx](https://github.com/vercel/styled-jsx), Vercel's CSS-in-JS solution. It transforms `<style jsx>` elements within JSX components into scoped CSS, allowing you to write component-level styles in plain CSS syntax that are automatically scoped to the component. | ||
|
|
||
| ## Usage | ||
|
|
||
| ```sh | ||
| npm install --save-dev @swc/plugin-styled-jsx @swc/core | ||
|
Comment on lines
+7
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new usage block only installs Useful? React with 👍 / 👎. |
||
| ``` | ||
|
|
||
| ```json | ||
| { | ||
| "jsc": { | ||
| "experimental": { | ||
| "plugins": [["@swc/plugin-styled-jsx", {}]] | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| # @swc/plugin-styled-jsx | ||
|
|
||
| ## 13.7.0 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked
scripts/bump-npm.sh:7-8, and every release regenerates each packageREADME.mdfrom itsREADME.tmpl.md. Because this patch only updates the generated README files and leaves the templates untouched (for examplepackages/jest/README.tmpl.md:1-3is still just the changelog placeholder), the new descriptions will be overwritten the next time maintainers run the bump script. The same problem applies to the other README.md-only edits in this commit.Useful? React with 👍 / 👎.