{"id":13508671,"url":"https://github.com/txs1992/stylus-converter","last_synced_at":"2026-01-23T06:52:39.076Z","repository":{"id":45139166,"uuid":"127397514","full_name":"txs1992/stylus-converter","owner":"txs1992","description":"🛠️🤖 A tool that converts a stylus into scss, or less, or other precompiled CSS. 一个将 stylus 转换为 scss 或 less 或其他预编译 CSS 的工具。","archived":false,"fork":false,"pushed_at":"2022-12-03T01:11:04.000Z","size":595,"stargazers_count":345,"open_issues_count":15,"forks_count":74,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-19T22:51:00.870Z","etag":null,"topics":["stylus","stylus-conveter","stylus-to","stylus-to-less","stylus-to-sass","stylus2","stylus2less","stylus2sass","stylus2scss","stylusto","stylustoless","stylustosass","stylustoscss"],"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/txs1992.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}},"created_at":"2018-03-30T07:37:38.000Z","updated_at":"2025-07-17T05:14:09.000Z","dependencies_parsed_at":"2023-01-23T04:15:07.197Z","dependency_job_id":null,"html_url":"https://github.com/txs1992/stylus-converter","commit_stats":null,"previous_names":["1969290646/stylus-converter"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/txs1992/stylus-converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/txs1992%2Fstylus-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/txs1992%2Fstylus-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/txs1992%2Fstylus-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/txs1992%2Fstylus-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/txs1992","download_url":"https://codeload.github.com/txs1992/stylus-converter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/txs1992%2Fstylus-converter/sbom","scorecard":{"id":112496,"data":{"date":"2025-08-04","repo":{"name":"github.com/txs1992/stylus-converter","commit":"4216dd1d472e33f72edb16d1a5153b6774208f38"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":2,"checks":[{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 2/9 approved changesets -- score normalized to 2","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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"22 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T12:52:07.586Z","repository_id":45139166,"created_at":"2025-08-15T12:52:07.586Z","updated_at":"2025-08-15T12:52:07.586Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28682263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: 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":["stylus","stylus-conveter","stylus-to","stylus-to-less","stylus-to-sass","stylus2","stylus2less","stylus2sass","stylus2scss","stylusto","stylustoless","stylustosass","stylustoscss"],"created_at":"2024-08-01T02:00:56.766Z","updated_at":"2026-01-23T06:52:39.058Z","avatar_url":"https://github.com/txs1992.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv  align=\"center\"\u003e\n  \u003cimg src=\"./banner.png\"\u003e\u003c/img\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://img.shields.io/travis/txs1992/stylus-converter.svg\"\u003e\n    \u003cimg src=\"http://img.shields.io/travis/txs1992/stylus-converter.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/npm/dt/stylus-converter.svg\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dt/stylus-converter.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/npm/dm/stylus-converter.svg\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/stylus-converter.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/npm/v/stylus-converter.svg\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/stylus-converter.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/npm/l/stylus-converter.svg\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/stylus-converter.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/node/v/passport.svg\"\u003e\n    \u003cimg src=\"https://img.shields.io/node/v/passport.svg\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e\n    \u003ca href=\"https://github.com/txs1992/stylus-converter/blob/master/doc/zh-cn.md#readme\"\u003e\n      中文\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://github.com/txs1992/stylus-converter#readme\"\u003e\n      English\n    \u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\n## What is this\n\n\u003e A tool that converts a stylus into scss, or less, or other precompiled CSS.\n\n## stylus-converter config\n\n### converter options\n\n| Attribute | Description | Type | Accepted Values | Default |\n| ---- | ---- | ---- | ---- | ---- |\n| `quote` | The quote type to use when converting strings | string | `'` / `\"` | `'` |\n| `conver` | Conversion type, such as conversion to scss syntax | string | scss | scss |\n| `autoprefixer` | Whether or not to automatically add a prefix, stylus will automatically add prefixes when converting stylus grammars. `@keyframes` | boolean | true / false | true |\n| `indentVueStyleBlock` | Indent the entire style block of a vue file with a certain amount of spaces. | number | number | 0 |\n\n### cli options\n\n| Attribute | Shorthand | Description | Accepted Values | Default |\n| ---- | ---- | ---- | ---- | ---- |\n| `--quote` | `-q` | The quote type to use when converting strings | single / dobule | single |\n| `--input` | `-i` | Enter a name, which can be a path to a file or a folder | - | - |\n| `--output` | `-o` | Output name, can be a path to a file or a folder | - | - |\n| `--conver ` | `-c` | Conversion type, such as conversion to scss syntax | scss | scss |\n| `--directory` | `-d` | Whether the input and output paths are directories | yes / no | no |\n| `--autoprefixer` | `-p` | Whether to add a prefix | yes / no | yes |\n| `--indentVueStyleBlock` | `-v` | Indent the entire style block of a vue file with a certain amount of spaces. | number | 0 |\n\n### How to handle single line comments\n```js\n1. First fork project and then clone project to local\ngit clone git@github.com:\u003cyour github\u003e/stylus-converter.git\n\n2. Enter the project directory\ncd stylus-converter\n\n3. Installation project depends\nnpm install\n\n4. Go to line 581 of the `node_modules/stylus/lib/lexer.js` file.\n\n5. Modify the code below.\n// before modification\nif ('/' == this.str[0] \u0026\u0026 '/' == this.str[1]) {\n  var end = this.str.indexOf('\\n');\n  if (-1 == end) end = this.str.length;\n  this.skip(end);\n  return this.advance();\n}\n\n// After modification\nif ('/' == this.str[0] \u0026\u0026 '/' == this.str[1]) {\n  var end = this.str.indexOf('\\n');\n  const str = this.str.substring(0, end)\n  if (-1 == end) end = this.str.length;\n  this.skip(end);\n  return new Token('comment', new nodes.Comment(str, suppress, true))\n}\n```\n\n## Use examples\n\n```javascript\n// download stylus-converter\nnpm install -g stylus-converter\n\n// Run the cli conversion file\nstylus-conver -i test.styl -o test.scss\n\n// Run the cli conversion directory\n// cd your project\nmv src src-temp\nstylus-conver -d yes -i src-temp -o src\n```\n\n## Conversion file comparison\n\n### Stylus source code before conversion\n\n```stylus\nhandleParams(args...)\n  args\n\n@media screen and (max-width: 500px) and (min-width: 100px), (max-width: 500px) and (min-height: 200px)\n  .foo\n    color: #100\n\n.foo\n  for i in 1..4\n    @media (min-width: 2 * (i + 7) px)\n```\n\n### Converted SCSS source code\n\n```scss\n@function handleParams($args...) {\n  @return $args;\n}\n\n@media screen and (max-width: 500px) and (min-width: 100px), (max-width: 500px) and (min-height: 200px) {\n  .foo {\n    color: #100;\n  }\n}\n\n.foo {\n  @for $i from 1 through 4 {\n    @media (min-width: 2 * ($i + 7) px) {\n      width: 100px * $i;\n    }\n  }\n}\n```\n\n\u003e If you do not want to add the default prefix for your converted @keyframes, please set `options.autoprefixer = false`\n\n### The `.vue` file before conversion\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv class=\"page-home\"\u003e\n    \u003cel-button\u003eclick me\u003c/el-button\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cstyle lang=\"stylus\"\u003e\n.page-home\n  .el-button\n    margin: 10px auto\n\u003c/style\u003e\n```\n\n### Converted `.vue`  file\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv class=\"page-home\"\u003e\n    \u003cel-button\u003eclick me\u003c/el-button\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cstyle lang=\"scss\"\u003e\n.page-home {\n  .el-button {\n    margin: 10px auto;\n  }\n}\n\u003c/style\u003e\n```\n\n## Build a development environment\n\n```text\n1. First fork project and then clone project to local\ngit clone git@github.com:\u003cyour github\u003e/stylus-converter.git\n\n2. Enter the project directory\ncd stylus-converter\n\n3. Installation project depends\nnpm install\n\n4. Package compilation source file\nnpm run build\n\n5. Local debugging cli\nnpm link\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftxs1992%2Fstylus-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftxs1992%2Fstylus-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftxs1992%2Fstylus-converter/lists"}