{"id":15280551,"url":"https://github.com/gespinha/postcss-spacer","last_synced_at":"2026-02-18T15:31:12.688Z","repository":{"id":57328513,"uuid":"92539143","full_name":"gespinha/postcss-spacer","owner":"gespinha","description":"PostCSS plugin for normalising spaces between lines on your stylesheets.","archived":false,"fork":false,"pushed_at":"2018-05-13T02:21:47.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T19:52:59.412Z","etag":null,"topics":["css","plugin","postcss","postcss-modules","postcss-plugin"],"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/gespinha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-26T18:43:48.000Z","updated_at":"2018-05-13T02:21:48.000Z","dependencies_parsed_at":"2022-09-21T01:52:15.742Z","dependency_job_id":null,"html_url":"https://github.com/gespinha/postcss-spacer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gespinha/postcss-spacer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespinha%2Fpostcss-spacer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespinha%2Fpostcss-spacer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespinha%2Fpostcss-spacer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespinha%2Fpostcss-spacer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gespinha","download_url":"https://codeload.github.com/gespinha/postcss-spacer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespinha%2Fpostcss-spacer/sbom","scorecard":{"id":423962,"data":{"date":"2025-08-11","repo":{"name":"github.com/gespinha/postcss-spacer","commit":"6d037e2260aa20dd6c825cbafa9e614c8e61aa97"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T01:52:20.404Z","repository_id":57328513,"created_at":"2025-08-19T01:52:20.404Z","updated_at":"2025-08-19T01:52:20.404Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29583916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T13:56:48.962Z","status":"ssl_error","status_checked_at":"2026-02-18T13:54:34.145Z","response_time":162,"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":["css","plugin","postcss","postcss-modules","postcss-plugin"],"created_at":"2024-09-30T12:11:16.390Z","updated_at":"2026-02-18T15:31:12.668Z","avatar_url":"https://github.com/gespinha.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Spacer\n\n__PostCSS Spacer__ is a [PostCSS] plugin for normalising spaces between lines on your stylesheets.\n\nMain features:\n- Set the space before or after certain lines\n- Define specific options for different types of lines\n- Target only lines with specific patterns on them\n\n## Installation\n\n```bash\n$ npm install postcss-spacer --save-dev\n```\n\n## Usage\n\nThis plugin runs as a [PostCSS] processor. To use it simply add it as a dependency on the `processors` option array in the `postcss` task.\n\n### Syntax\n\nThis plugin can be used with pure CSS, SCSS, Sass or even Less. Pure CSS is supported by [PostCSS] natively, however to work with SCSS, Sass or Less you'll need to use a custom syntax parser such as:\n\n- __SCSS__: [`postcss-scss`]\n- __Sass__: [`sugarss`]\n- __Less__: [`postcss-less`]\n\nNote: to use a syntax parser you'll have to set it as a dependency (`require()`) on the `syntax` option of [PostCSS] like this, for example:\n\n```js\ngrunt.initConfig({\n    postcss: {\n      options: {\n        processors: [\n          require('postcss-spacer')({ /* plugin options */ })\n        ],\n        syntax: require('sugarss')\n      },\n    }\n});\n```\n\n### Grunt:\n\nTo run the `postcss` properly in Grunt its suggested to use [`grunt-postcss`] as a dependency.\n\n```js\ngrunt.initConfig({\n    postcss: {\n      options: {\n        processors: [\n          require('postcss-spacer')({ /* plugin options */ })\n        ]\n      },\n      dist: {\n        src: '*.css'\n      }\n    }\n});\n\ngrunt.loadNpmTasks('grunt-postcss');\n```\n\n## Options\n\nThis plugin analyses the types of lines on your `dist` files and fixes their spacing size according to the options you set.\n\n### Line Types\n\nEach line type is an option property in itself, which receives an object with a certain set of options for that specific file type.\n\nIn this example the `comments` handle is used as the key and its value is a set of options that adds 4 lines `before` and 2 lines `after` each comment:\n\n```js\ngrunt.initConfig({\n    postcss: {\n      options: {\n        processors: [\n          require('postcss-spacer')({\n            'comments': {\n              before: 4,\n              after: 2\n            }\n          })\n        ]\n      },\n    }\n});\n```\n\nSupported line types:\n\n- `all` (object) : targets all types of lines\n- `comments` (object) : targets comments held within `/**/`\n- `rules` (object) : targets CSS rules\n- `declarations` (object) : targets CSS declarations\n- `at-rules` (object) : targets CSS at-rules\n\n### Line Options\n\n- `before` (number) : **false** : adds empty lines before the target line\n- `after` (number) : **false** : adds empty lines after the target line\n\nExample: \n\n__JS__\n```js\n'comments': {\n  before: 4,\n  after: 2\n},\n```\n\n__CSS__\n\nBefore:\n```css\n/* ===== MAIN STYLES ===== */\nbody{\n  background: #fff\n}\n```\n\nAfter:\n```css\n\n\n\n\n/* ===== MAIN STYLES ===== */\n\n\nbody{\n  background: #fff\n}\n```\n\nNote: adding `0` as a value on any of the above options will remove the empty lines on that specific area of a line.\n\n### Patterns\n\nIf `pattern` is defined, each line of the defined line type will be analysed and if any defined pattern (string) is found, the options are run\n\n- `pattern` (array) : **false** : array of patterns to target\n\nExample:\n\n__JS__\n```js\n'comments': {\n  pattern: ['====='],\n  after: 2\n},\n```\n\n__CSS__\n\nBefore:\n```css\n/* ===== MAIN STYLES ===== */\nbody{\n  background: #fff\n}\n```\n\nAfter:\n```css\n/* ===== MAIN STYLES ===== */\n\n\nbody{\n  background: #fff\n}\n```\n\n## Debug\n\nBy default, after each process a summary is displayed with the number of lines that were changed and how many patterns were identified.\n\n- `debug` (boolean) : **false** : enables debug mode, which logs each line that was targeted by the process and how many patterns were identified in it. In the end of each line type report a comprehensive summary is also displayed. This mode will help the user identify why weren't certain lines targeted in the process and what the process is actually doing.\n\nEach line type can hold its one `debug` mode, like so:\n\n```js\n'comments': {\n  pattern: ['====='],\n  after: 2,\n  debug: true\n},\n```\n\n## Changelog\n\n- **[v0.0.4]** Debug logs now contain colors to make them easier to read.\n- **[v0.0.3]** **More verbose error messages**: Error messages should be spot on the issue that is causing the process to fail.\n- **[v0.0.2]** **Break task when error occurs**: When an error is found on the process, or something went wrong, the task should break.\n- **[v0.0.1]** Initial release.\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2018 Goncalo Espinha\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[PostCSS]: https://github.com/postcss/postcss\n[`postcss-sorting`]: https://github.com/hudochenkov/postcss-sorting\n[`postcss-scss`]: https://github.com/postcss/postcss-scss\n[`postcss-less`]: https://github.com/shellscape/postcss-less\n[`grunt-postcss`]: https://github.com/nDmitry/grunt-postcss\n[`sugarss`]: https://github.com/postcss/sugarss","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgespinha%2Fpostcss-spacer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgespinha%2Fpostcss-spacer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgespinha%2Fpostcss-spacer/lists"}