{"id":17478823,"url":"https://github.com/strarsis/eyeglass-file-text","last_synced_at":"2025-05-15T05:09:13.791Z","repository":{"id":57232055,"uuid":"42547787","full_name":"strarsis/eyeglass-file-text","owner":"strarsis","description":"Sass eyeglass module for getting the contents of a text file as string","archived":false,"fork":false,"pushed_at":"2016-10-18T14:49:45.000Z","size":127,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T16:17:46.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strarsis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-15T21:31:58.000Z","updated_at":"2018-10-21T08:59:24.000Z","dependencies_parsed_at":"2022-08-31T14:10:25.202Z","dependency_job_id":null,"html_url":"https://github.com/strarsis/eyeglass-file-text","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strarsis%2Feyeglass-file-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strarsis%2Feyeglass-file-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strarsis%2Feyeglass-file-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strarsis%2Feyeglass-file-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strarsis","download_url":"https://codeload.github.com/strarsis/eyeglass-file-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276463,"owners_count":22043868,"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":[],"created_at":"2024-10-18T20:44:56.227Z","updated_at":"2025-05-15T05:09:08.776Z","avatar_url":"https://github.com/strarsis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eyeglass-file-text\n\nSass eyeglass module for getting the contents of text or binary files as (encoded) string.\n\n[![david](https://david-dm.org/strarsis/eyeglass-file-text.svg)](https://david-dm.org/strarsis/eyeglass-file-text)\n\n[![NPM](https://nodei.co/npm/eyeglass-file-text.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/eyeglass-file-text/)\n\n\nNew: Supports binary files now (encodes to base64).\n\nNew: Normalizes line endings to prevent issues with quotes and later output of the string.\n\n\n\nInstallation\n------------\n````\nnpm install --save-dev eyeglass-file-text\n````\n\n\nUsage\n-----\n````\n@import 'file-text';\n\n// Fetch text file:\n$text  : file-text('./loremipsum.txt');\n    // encoding can be explicitly specified by 2nd argument\n\n// Fetch binary file:\n$base64: file-binary('./test.jpg');\n    // binary file content is represented as base64 text\n\n\n// The string can then be used as usual in sass:\n.test-text {\n  content: $text;\n}\n\n.test-binary {\n  background: url(\"data:image/jpeg;base64,#{$base64}\");\n}\n````\n\n\nArguments\n---------\n### file-text\n#### path\nPath to the file.\n\n#### encoding\nEncoding of the file.\nDefaults to utf8.\n\n\n### file-binary\n#### path\nPath to the file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrarsis%2Feyeglass-file-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrarsis%2Feyeglass-file-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrarsis%2Feyeglass-file-text/lists"}