{"id":18318893,"url":"https://github.com/axept/babel-plugin-transform-prejss","last_synced_at":"2026-05-08T04:05:37.609Z","repository":{"id":143846498,"uuid":"83418653","full_name":"axept/babel-plugin-transform-prejss","owner":"axept","description":"Transform PreJSS constructions to plain JSS objects","archived":false,"fork":false,"pushed_at":"2017-03-27T05:37:40.000Z","size":207,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-17T18:52:11.770Z","etag":null,"topics":["babel","babel-plugin","css","css-in-js","jss","prejss"],"latest_commit_sha":null,"homepage":"https://github.com/axept/prejss","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/axept.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-02-28T10:16:28.000Z","updated_at":"2017-05-29T19:07:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1b3d1af-006b-4dca-8915-f08e2d35137f","html_url":"https://github.com/axept/babel-plugin-transform-prejss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axept%2Fbabel-plugin-transform-prejss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axept%2Fbabel-plugin-transform-prejss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axept%2Fbabel-plugin-transform-prejss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axept%2Fbabel-plugin-transform-prejss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axept","download_url":"https://codeload.github.com/axept/babel-plugin-transform-prejss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054196,"owners_count":21039952,"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":["babel","babel-plugin","css","css-in-js","jss","prejss"],"created_at":"2024-11-05T18:11:51.805Z","updated_at":"2026-05-08T04:05:37.556Z","avatar_url":"https://github.com/axept.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-transform-prejss\n\n[![Travis branch](https://img.shields.io/travis/axept/babel-plugin-transform-prejss/master.svg?style=flat-square)](https://travis-ci.org/axept/babel-plugin-transform-prejss)\n[![npm version](https://img.shields.io/npm/v/babel-plugin-transform-prejss.svg?style=flat-square)](https://www.npmjs.com/package/babel-plugin-transform-prejss)\n[![npm downloads](https://img.shields.io/npm/dt/babel-plugin-transform-prejss.svg?style=flat-square)](https://www.npmjs.com/package/babel-plugin-transform-prejss)\n[![npm license](https://img.shields.io/npm/l/babel-plugin-transform-prejss.svg?style=flat-square)](https://www.npmjs.com/package/babel-plugin-transform-prejss)\n\n[Babel](https://github.com/babel/babel) plugin which turns PreJSS constructions into JSS objects.\n\n\n## Example\n\n**In**\n\n```js\nconst button = ({selector}) =\u003e preJSS`\n  button {\n    color: ${props =\u003e props.disabled ? 'grey' : 'red'};\n    width: 200px;\n    height: 70px;\n    \u0026:hover {\n      text-decoration: underline;\n    }\n  }\n`\n```\n\n**Out**\n\n```js\nvar button = function button(_ref) {\n  var selector = _ref.selector;\n  return {\n    'button': {\n      'color': function color(props) {\n        return props.disabled ? 'grey' : 'red';\n      },\n      'width': '200px',\n      'height': '70px',\n      '\u0026:hover': {\n        'textDecoration': 'underline'\n      }\n    }\n  };\n};\n```\n\nSee more details here: https://github.com/axept/prejss\n\n\n## Installation\n\n```bash\nnpm install babel-plugin-transform-prejss --save-dev\n```\n\n\n## Usage\n\n### Options\n\n+ `removeImport: \u003cBoolean|String\u003e` - by default is `prejss`. You can configure it to `false` if you wouldn't like to remove imports for \"prejss\" automatically. But think twice! By disabling this option you may include server code and a lot of unnecessary dependencies into your bundle.\n\n+ `silent: \u003cBoolean\u003e` - by default is `false`. This option is configuring if the plugin should or not to log about each removed prejss import.\n\n+ `namespace: \u003cString\u003e` - by default is `preJSS`\n\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\"transform-prejss\"]\n}\n```\n\n\n### Via CLI\n\n```sh\nbabel --plugins transform-prejss script.js\n```\n\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n  plugins: [\"transform-prejss\"]\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxept%2Fbabel-plugin-transform-prejss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxept%2Fbabel-plugin-transform-prejss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxept%2Fbabel-plugin-transform-prejss/lists"}