{"id":16714553,"url":"https://github.com/gucong3000/postcss-jsx","last_synced_at":"2025-04-04T07:06:24.344Z","repository":{"id":57328146,"uuid":"129996160","full_name":"gucong3000/postcss-jsx","owner":"gucong3000","description":"PostCSS syntax for parsing CSS in JS literals","archived":false,"fork":false,"pushed_at":"2024-02-27T13:34:15.000Z","size":119,"stargazers_count":76,"open_issues_count":7,"forks_count":28,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T19:36:00.190Z","etag":null,"topics":["css","css-in-js","parsing","postcss","postcss-syntax","react","syntax"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gucong3000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-18T03:05:28.000Z","updated_at":"2024-05-31T15:14:12.000Z","dependencies_parsed_at":"2024-06-18T12:38:20.651Z","dependency_job_id":"f77d934d-7e37-4bf5-8b60-6ae88785475e","html_url":"https://github.com/gucong3000/postcss-jsx","commit_stats":{"total_commits":48,"total_committers":10,"mean_commits":4.8,"dds":"0.27083333333333337","last_synced_commit":"0f5ca93d8beb6a160c25a6c26f78361cf73963cb"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fpostcss-jsx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fpostcss-jsx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fpostcss-jsx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fpostcss-jsx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gucong3000","download_url":"https://codeload.github.com/gucong3000/postcss-jsx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135143,"owners_count":20889420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","css-in-js","parsing","postcss","postcss-syntax","react","syntax"],"created_at":"2024-10-12T21:05:44.893Z","updated_at":"2025-04-04T07:06:24.317Z","avatar_url":"https://github.com/gucong3000.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"PostCSS JSX Syntax\n====\n\n[![NPM version](https://img.shields.io/npm/v/postcss-jsx.svg?style=flat-square)](https://www.npmjs.com/package/postcss-jsx)\n[![Travis](https://img.shields.io/travis/gucong3000/postcss-jsx.svg)](https://travis-ci.org/gucong3000/postcss-jsx)\n[![Travis](https://img.shields.io/travis/gucong3000/postcss-syntaxes.svg?label=integration)](https://travis-ci.org/gucong3000/postcss-syntaxes)\n[![Codecov](https://img.shields.io/codecov/c/github/gucong3000/postcss-jsx.svg)](https://codecov.io/gh/gucong3000/postcss-jsx)\n[![David](https://img.shields.io/david/gucong3000/postcss-jsx.svg)](https://david-dm.org/gucong3000/postcss-jsx)\n\n\u003cimg align=\"right\" width=\"95\" height=\"95\"\n\ttitle=\"Philosopher’s stone, logo of PostCSS\"\n\tsrc=\"http://postcss.github.io/postcss/logo.svg\"\u003e\n\n[PostCSS](https://github.com/postcss/postcss) syntax for parsing [CSS in JS](https://github.com/MicheleBertoli/css-in-js) literals:\n\n- [aphrodite](https://github.com/Khan/aphrodite)\n- [astroturf](https://github.com/4Catalyzer/astroturf)\n- [csjs](https://github.com/rtsao/csjs)\n- [css-light](https://github.com/streamich/css-light)\n- [cssobj](https://github.com/cssobj/cssobj)\n- [electron-css](https://github.com/azukaar/electron-css)\n- [emotion](https://github.com/emotion-js/emotion)\n- [freestyler](https://github.com/streamich/freestyler)\n- [glamor](https://github.com/threepointone/glamor)\n- [glamorous](https://github.com/paypal/glamorous)\n- [j2c](https://github.com/j2css/j2c)\n- [linaria](https://github.com/callstack/linaria)\n- [lit-css](https://github.com/bashmish/lit-css)\n- [react-native](https://github.com/necolas/react-native-web)\n- [react-style](https://github.com/js-next/react-style)\n- [reactcss](https://github.com/casesandberg/reactcss)\n- [styled-components](https://github.com/styled-components/styled-components)\n- [styletron-react](https://github.com/rtsao/styletron)\n- [styling](https://github.com/andreypopp/styling)\n- [typestyle](https://github.com/typestyle/typestyle)\n\n## Getting Started\n\nFirst thing's first, install the module:\n\n```\nnpm install postcss-syntax postcss-jsx --save-dev\n```\n\n## Use Cases\n\n```js\nconst postcss = require('postcss');\nconst stylelint = require('stylelint');\nconst syntax = require('postcss-syntax');\npostcss([stylelint({ fix: true })]).process(source, { syntax: syntax }).then(function (result) {\n\t// An alias for the result.css property. Use it with syntaxes that generate non-CSS output.\n\tresult.content\n});\n```\n\ninput:\n```javascript\nimport glm from 'glamorous';\nconst Component1 = glm.a({\n\tflexDirectionn: 'row',\n\tdisplay: 'inline-block',\n\tcolor: '#fff',\n});\n```\n\noutput:\n```javascript\nimport glm from 'glamorous';\nconst Component1 = glm.a({\n\tcolor: '#fff',\n\tdisplay: 'inline-block',\n\tflexDirectionn: 'row',\n});\n```\n\n## Advanced Use Cases\n\nAdd support for more `css-in-js` package:\n```js\nconst syntax = require('postcss-syntax')({\n\t\"i-css\": (index, namespace) =\u003e namespace[index + 1] === \"addStyles\",\n\t\"styled-components\": true,\n});\n```\n\nSee: [postcss-syntax](https://github.com/gucong3000/postcss-syntax)\n\n## Style Transformations\n\nThe main use case of this plugin is to apply PostCSS transformations to CSS code in template literals \u0026 styles as object literals.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgucong3000%2Fpostcss-jsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgucong3000%2Fpostcss-jsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgucong3000%2Fpostcss-jsx/lists"}