{"id":16760377,"url":"https://github.com/ryanve/read-css","last_synced_at":"2026-05-12T04:32:20.144Z","repository":{"id":57348500,"uuid":"92203316","full_name":"ryanve/read-css","owner":"ryanve","description":"Read a CSS file into an abstract syntax tree object","archived":false,"fork":false,"pushed_at":"2017-06-16T20:50:06.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T21:51:23.160Z","etag":null,"topics":["css","filesystem","nodejs","parse","readfile"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/read-css","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanve.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-23T17:56:18.000Z","updated_at":"2023-08-08T21:06:27.000Z","dependencies_parsed_at":"2022-08-31T20:11:20.594Z","dependency_job_id":null,"html_url":"https://github.com/ryanve/read-css","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fread-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fread-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fread-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fread-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanve","download_url":"https://codeload.github.com/ryanve/read-css/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847056,"owners_count":20357317,"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":["css","filesystem","nodejs","parse","readfile"],"created_at":"2024-10-13T04:23:19.770Z","updated_at":"2026-05-12T04:32:15.097Z","avatar_url":"https://github.com/ryanve.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# read-css\nRead a CSS file into an AST. AST format is from the [`css.parse`](https://www.npmjs.com/package/css) method. Methods work like `fs.readFile` and `fs.readFileSync`. If you supply a callback, method will be async. If not, method will be sync.\n\n## install\n```\nnpm install read-css\n```\n\n## usage\n\n```\nconst read = require('read-css')\n```\n\n### sync usage\n\n```js\nread('example.css') // tree\n```\n\n### async usage\n\n```js\nconst callback = (err, data) =\u003e {\n  if (err) throw err\n  console.log(JSON.stringify(data, null, 2))\n}\n\nread('example.css', callback)\n```\n\n## output\n\n```js\nconst read = require('read-css')\nread('test.css')\n```\n\n[View sample AST output in `test.json`](test.json)\n\n## develop\n\n```\nnpm install\nnpm test\n```\n\n## related\n\n[reap-css](https://www.npmjs.com/package/reap-css)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanve%2Fread-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanve%2Fread-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanve%2Fread-css/lists"}