{"id":19123408,"url":"https://github.com/dependents/node-sass-lookup","last_synced_at":"2025-04-15T21:09:01.524Z","repository":{"id":34290940,"uuid":"38182140","full_name":"dependents/node-sass-lookup","owner":"dependents","description":"Get the file associated with a Sass import","archived":false,"fork":false,"pushed_at":"2025-01-30T16:51:58.000Z","size":387,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T01:13:44.405Z","etag":null,"topics":["algorithm","lookup","partials","resolution","sass","scss"],"latest_commit_sha":null,"homepage":null,"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/dependents.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":"2015-06-28T01:35:50.000Z","updated_at":"2025-01-30T16:52:02.000Z","dependencies_parsed_at":"2024-04-03T15:26:53.012Z","dependency_job_id":"87ce3a85-b0fb-496c-9549-32a742094d7b","html_url":"https://github.com/dependents/node-sass-lookup","commit_stats":{"total_commits":22,"total_committers":4,"mean_commits":5.5,"dds":"0.36363636363636365","last_synced_commit":"b2a59bcbea8e65368185df7f4748e437ca6208c3"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-sass-lookup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-sass-lookup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-sass-lookup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dependents%2Fnode-sass-lookup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dependents","download_url":"https://codeload.github.com/dependents/node-sass-lookup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248706617,"owners_count":21148747,"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":["algorithm","lookup","partials","resolution","sass","scss"],"created_at":"2024-11-09T05:25:33.662Z","updated_at":"2025-04-15T21:09:01.489Z","avatar_url":"https://github.com/dependents.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sass-lookup\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-sass-lookup/ci.yml?branch=main\u0026label=CI\u0026logo=github)](https://github.com/dependents/node-sass-lookup/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/sass-lookup?logo=npm\u0026logoColor=fff)](https://www.npmjs.com/package/sass-lookup)\n[![npm downloads](https://img.shields.io/npm/dm/sass-lookup)](https://www.npmjs.com/package/sass-lookup)\n\n\u003e Get the file associated with a Sass import\n\nThis module replaces the Sass compiler's lookup algorithm for resolving a partial's path.\n\n* Handles underscored/non-underscored partials, partials with filenames, partials within subdirectories, partials with the `.scss` in the name, all of it.\n\n*Originally built for [Dependents](https://github.com/dependents/Dependents)*\n\n## Usage\n\n```js\nconst sassLookup = require('sass-lookup');\n\nsassLookup({\n  dependency: 'foo',\n  filename: 'path/to/filename',\n  directory: 'path/to/directory'\n})\n```\n\n* `dependency`: The partial's name\n  * If your sass file had `@import \"foo\";`, then `\"foo\"` would be the dependency name\n* `filename`: The file importing the dependency\n* `directory`: The location(s) of all sass files\n  * A list of multiple directories is also supported for this argument.\n\nExample:\n\n```js\nconst sassLookup = require('sass-lookup');\n\nsassLookup({\n  dependency: 'variables',\n  filename: 'app/styles/styles.scss',\n  directory: 'app/styles'\n}); // yields app/styles/variables.scss\n```\n\n* This assumes that the file `app/styles/styles.scss` has `@import \"variables\";` and that all of the other sass files are located within `app/styles`.\n* Would yield `app/styles/_variables.scss` if the partial had an underscored filename.\n\n## CLI\n\nAssumes a global install of sass-lookup with `npm install -g sass-lookup`\n\n```sh\nsass-lookup [options] path/to/file\n```\n\nRun `sass-lookup --help` to see all the options.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdependents%2Fnode-sass-lookup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdependents%2Fnode-sass-lookup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdependents%2Fnode-sass-lookup/lists"}