{"id":22585348,"url":"https://github.com/bamieh/react-inline-styler-processor-boilerplate","last_synced_at":"2026-05-06T07:32:24.061Z","repository":{"id":95960278,"uuid":"86710012","full_name":"Bamieh/react-inline-styler-processor-boilerplate","owner":"Bamieh","description":"A boilerplate for creating React Inline Styler Processors.","archived":false,"fork":false,"pushed_at":"2017-06-29T11:07:12.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-28T17:17:53.682Z","etag":null,"topics":["boilerplate","processor","react","react-inline-styler"],"latest_commit_sha":null,"homepage":"https://github.com/Bamieh/react-inline-styler","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/Bamieh.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":"2017-03-30T14:09:10.000Z","updated_at":"2017-05-10T10:38:54.000Z","dependencies_parsed_at":"2023-04-04T17:47:48.572Z","dependency_job_id":null,"html_url":"https://github.com/Bamieh/react-inline-styler-processor-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bamieh/react-inline-styler-processor-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bamieh%2Freact-inline-styler-processor-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bamieh%2Freact-inline-styler-processor-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bamieh%2Freact-inline-styler-processor-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bamieh%2Freact-inline-styler-processor-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bamieh","download_url":"https://codeload.github.com/Bamieh/react-inline-styler-processor-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bamieh%2Freact-inline-styler-processor-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32683788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["boilerplate","processor","react","react-inline-styler"],"created_at":"2024-12-08T07:08:04.788Z","updated_at":"2026-05-06T07:32:24.042Z","avatar_url":"https://github.com/Bamieh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Inline Styler Processor Boilerplate\n\nA boilerplate for creating [React Inline Styler](https://github.com/Bamieh/react-inline-styler) Processors.\n\nThe boilerplate provides the following:\n\n- easy way to write your react inline styler processor.\n- configured babel for es6+.\n- configured prepublish and build process.\n- configured unit testing with mocha.\n- configured coverage with nyc\n- configured travis.\n- configured coveralls and codecov.\n\n\n```\ngit clone https://github.com/Bamieh/react-inline-styler-processor-boilerplate.git\ncd react-inline-styler-processor-boilerplate\nnpm install\n```\n\n\n## Creating a processor\n\nCreating a processor is simple, the processor is just a function that accepts 1 style object at a time, and the provided configs from the `Provider` of react inline styler.\n\nThe function returns a processed styles object\n\n## Example\n\nIn this example we will create a processor that turns font sizes from `pixels` to `rems`.\n\n```\nimport invariant from 'invariant';\n\nexport default function processor(styleObject, configs) {\n  const basePixelFontSize = configs.basePixelFontSize;\n\n  invariant(typeof basePixelFontSize === \"undefined\", \n    'please pass \"basePixelFontSize\" to the react-inline-styler` +\n    `Provider in order for pixelsToRem processor to work.`)\n\n\n  return Object.entries(styleObject).map(styleAttribute =\u003e {\n    const [attributeKey, attributeValue] = styleAttribute;\n    if(/fontSize/.test(attributeKey)) {\n      styleAttribute[attributeKey] = `${attributeValue/basePixelFontSize}rem`;\n    }\n\n    return styleAttribute;\n  })\n}\n```\n\n\n## Testing\n\nThe boilerplate uses mocha for unit testing, run `npm test` to run the tests. The test files are located in the `test` directory, the `setup.js` file is used to setup mocha if needed. \n\n\n```\n# for single run\nnpm run test\n\n#for continuous development\nnpm run test:watch\n```\n\n# Coverage\n\nUnit tests are covered by [istanbul's nyc](https://github.com/istanbuljs/nyc). to run the coverage test, simply run\n\n```\nnpm run coverage\n```\n\n## Todo\n\nWith the following todo list in mind, feel free to help out!\n\n- example folder\n- improve documentation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamieh%2Freact-inline-styler-processor-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbamieh%2Freact-inline-styler-processor-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamieh%2Freact-inline-styler-processor-boilerplate/lists"}