{"id":13471622,"url":"https://github.com/facebook/stylex","last_synced_at":"2025-05-12T00:54:33.200Z","repository":{"id":210989796,"uuid":"575723287","full_name":"facebook/stylex","owner":"facebook","description":"StyleX is the styling system for ambitious user interfaces.","archived":false,"fork":false,"pushed_at":"2025-05-10T06:45:06.000Z","size":11236,"stargazers_count":8656,"open_issues_count":61,"forks_count":325,"subscribers_count":51,"default_branch":"main","last_synced_at":"2025-05-12T00:54:26.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://stylexjs.com","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/facebook.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2022-12-08T06:38:09.000Z","updated_at":"2025-05-11T19:01:18.000Z","dependencies_parsed_at":"2024-04-16T02:32:00.849Z","dependency_job_id":"384f7105-cb92-479e-b2a1-0c7c715075e1","html_url":"https://github.com/facebook/stylex","commit_stats":{"total_commits":286,"total_committers":78,"mean_commits":"3.6666666666666665","dds":0.5454545454545454,"last_synced_commit":"1357106c4091073c45cd5f568acd350d16baf99a"},"previous_names":["facebook/stylex"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2Fstylex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2Fstylex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2Fstylex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2Fstylex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/facebook","download_url":"https://codeload.github.com/facebook/stylex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253655955,"owners_count":21943081,"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":[],"created_at":"2024-07-31T16:00:47.397Z","updated_at":"2025-05-12T00:54:33.145Z","avatar_url":"https://github.com/facebook.png","language":"JavaScript","readme":"# StyleX \u0026middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/stylex/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/@stylexjs/stylex.svg?style=flat)](https://www.npmjs.com/package/@stylexjs/stylex) [![tests](https://github.com/facebook/stylex/actions/workflows/tests.yml/badge.svg)](https://github.com/facebook/stylex/actions/workflows/tests.yml) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/facebook/stylex/blob/main/.github/CONTRIBUTING.md)\n\nStyleX is a JavaScript library for defining styles for optimized user\ninterfaces.\n\n## Documentation\n\n[Documentation Website](https://stylexjs.com)\n\nDocumentation for individual packages can be found in their respective README\nfiles. Start with\n[`@stylexjs/stylex`](https://github.com/facebook/stylex/blob/main/packages/stylex).\n\n### Example\n\nHere is a simple example of StyleX use:\n\n```js\nimport * as stylex from '@stylexjs/stylex';\n\nconst styles = stylex.create({\n  root: {\n    padding: 10,\n  },\n  element: {\n    backgroundColor: 'red',\n  },\n});\n\nconst styleProps = stylex.props(styles.root, styles.element);\n```\n\n## Development\n\nThis is the development monorepo for StyleX.\n\n### Structure\n\n- `.github`\n  - Contains workflows used by GitHub Actions.\n  - Contains issue templates and contribution guidelines.\n- `examples`\n  - Contains examples using StyleX and its integration with build tools.\n- `packages`\n  - Contains the public and private packages managed in the monorepo.\n  - [babel-plugin](https://github.com/facebook/stylex/blob/main/packages/babel-plugin)\n  - [benchmarks](https://github.com/facebook/stylex/blob/main/packages/benchmarks)\n  - [cli](https://github.com/facebook/stylex/blob/main/packages/cli)\n  - [docs](https://github.com/facebook/stylex/blob/main/packages/docs)\n  - [eslint-plugin](https://github.com/facebook/stylex/blob/main/packages/eslint-plugin)\n  - [postcss-plugin](https://github.com/facebook/stylex/blob/main/packages/postcss-plugin)\n  - [rollup-plugin](https://github.com/facebook/stylex/blob/main/packages/rollup-plugin)\n  - [scripts](https://github.com/facebook/stylex/blob/main/packages/scripts)\n  - [shared](https://github.com/facebook/stylex/blob/main/packages/shared)\n  - [style-value-parser](https://github.com/facebook/stylex/blob/main/packages/style-value-parser)\n  - [stylex](https://github.com/facebook/stylex/blob/main/packages/stylex)\n\n\n### Tasks\n\nFirst, `npm install` the npm workspace.\n\n- `build`\n  - Use `npm run build` to run the build script in every package.\n  - Use `npm run build -w \u003cpackage-name\u003e` to run the build script for a specific\n    package.\n- `test`\n  - Use `npm run test` to run tests for every package.\n  - Use `npm run test -w \u003cpackage-name\u003e` to run the test script for a specific\n    package. More details can be found in the contributing guide below.\n\n## Contributing\n\nDevelopment happens in the open on GitHub and we are grateful for contributions\nincluding bug fixes, improvements, and ideas.\n\n### Code of Conduct\n\nThis project expects all participants to adhere to Meta's OSS\n[Code of Conduct](https://opensource.fb.com/code-of-conduct/). Please read\nthe full text so that you can understand what actions will and will not be\ntolerated.\n\n### Contributing Guide\n\nRead the\n[contributing guide](https://github.com/facebook/stylex/blob/main/.github/CONTRIBUTING.md)\nto learn about our development process, how to propose bug fixes and\nimprovements, and how to build and test your changes.\n\n### Architectural Principles\n\nBefore proposing a change or addition to the StyleX API, you should familiarize\nyourself with the\n[goals and architectural principles](https://stylexjs.com/docs/learn/thinking-in-stylex/)\nof the project.\n\n### License\n\nStyleX is [MIT licensed](./LICENSE).\n","funding_links":[],"categories":["JavaScript","📊 Data \u0026 Analytics","前端开发框架及项目"],"sub_categories":["React工具库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacebook%2Fstylex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffacebook%2Fstylex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacebook%2Fstylex/lists"}