{"id":22616017,"url":"https://github.com/lonelyhentxi/grasslands","last_synced_at":"2025-04-11T00:13:52.277Z","repository":{"id":214205195,"uuid":"723736950","full_name":"lonelyhentxi/grasslands","owner":"lonelyhentxi","description":"A grass wrapper with nodejs importer and an adapter between grass and sass-loader etc.","archived":false,"fork":false,"pushed_at":"2024-02-19T08:31:13.000Z","size":86,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T00:13:47.366Z","etag":null,"topics":["grass","grasslands","n-api","napi","napi-rs","node-addon","node-addon-api","rspack","rust","sass","sass-loader","scss","webpack"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/lonelyhentxi.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":"2023-11-26T16:03:45.000Z","updated_at":"2023-12-16T13:07:30.000Z","dependencies_parsed_at":"2023-12-26T17:18:43.525Z","dependency_job_id":"ae50993a-5272-4a72-b5e9-cfb052b6c539","html_url":"https://github.com/lonelyhentxi/grasslands","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"7b39afa2025b1bbbffcad530ed1495779b8e9a32"},"previous_names":["lonelyhentxi/grasslands"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonelyhentxi%2Fgrasslands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonelyhentxi%2Fgrasslands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonelyhentxi%2Fgrasslands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonelyhentxi%2Fgrasslands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lonelyhentxi","download_url":"https://codeload.github.com/lonelyhentxi/grasslands/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317730,"owners_count":21083530,"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":["grass","grasslands","n-api","napi","napi-rs","node-addon","node-addon-api","rspack","rust","sass","sass-loader","scss","webpack"],"created_at":"2024-12-08T19:10:24.605Z","updated_at":"2025-04-11T00:13:52.258Z","avatar_url":"https://github.com/lonelyhentxi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `grasslands`\n\n![https://github.com/lonelyhentxi/grasslands/actions](https://github.com/lonelyhentxi/grasslands/workflows/CI/badge.svg) ![Version](https://img.shields.io/npm/v/grasslands) ![GitHub License](https://img.shields.io/github/license/lonelyhentxi/grasslands)\n\nA wrapper with nodejs import resolver and an adapter between [grass](https://github.com/connorskees/grass) and sass-loader? etc.\n\n\u003e **Performance**\n\u003e grass is benchmarked against dart-sass and sassc (libsass) here. In general, grass appears to be ~2x faster than dart-sass and ~1.7x faster than sassc.\n\nAnd In my tests, it is **5~10x** faster than `sass` package.\n\nThanks to the efforts of the grass authors, this package compiles scss files much faster than the version of `sass` (dart-sass that compiled to js, wildly used version), and without some of the specific problems of `dart-sass-embedded`, such as memory leaks.\n\n**Attention**\n\nSince the current version of [the origin grass](https://github.com/connorskees/grass) has some bugs when dealing with empty argument lists for mixins and functions, and doesn't support custom importers, I'm using [my own forked version of grass](https://github.com/lonelyhentxi/grass) for now, and will switch the upstream of this package to the origin grass if it supports these capabilities in the future.\n\n# Usage\n\n## Install the package\n\n```shell\nnpm install -D grasslands\n```\n\n## Usage for sass-loader\n\n```js\n// your other configs\n{\n  loader: 'sass-loader',\n  options: {\n    implementation: require.resolve('grasslands/lib/sass-loader-adapter'),\n    sassOptions: {\n      // to enable thread-loader when use old versions of sass-loader, pass a logger\n      logger: {\n        debug(message, _loggerOptions) {\n          console.debug(message);\n        },\n        warn(message, _loggerOptions) {\n          console.warn(message);\n        },\n      },\n      includePaths: [\n        path.resolve('your/include_paths1'),\n        path.resolve('your/include_paths2')\n      ],\n      resolveAlias: {\n        '@utils': ['src/utils']\n      }\n    },\n  }\n}\n// your other configs\n```\n\nCurrently not support sassOptions.importer/importers as it 2x ~ 4x slower.\n\n# Support\n\n### Operating Systems\n\n|                  | node16 | node18 |\n| ---------------- | ------ | ------ |\n| Windows x64      | ✓      | ✓      |\n| Windows arm64    | ✓      | ✓      |\n| macOS x64        | ✓      | ✓      |\n| macOS arm64      | ✓      | ✓      |\n| Linux x64 gnu    | ✓      | ✓      |\n| Linux x64 musl   | ✓      | ✓      |\n| Linux arm64 gnu  | ✓      | ✓      |\n| Linux arm64 musl | ✓      | ✓      |\n| FreeBSD x64      | ✓      | ✓      |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonelyhentxi%2Fgrasslands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flonelyhentxi%2Fgrasslands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonelyhentxi%2Fgrasslands/lists"}