{"id":25525426,"url":"https://github.com/seanmorris/rawquire","last_synced_at":"2026-01-02T11:30:14.447Z","repository":{"id":65482567,"uuid":"293930796","full_name":"seanmorris/rawquire","owner":"seanmorris","description":"Import raw plaintext into your javascript with a babel macro.","archived":false,"fork":false,"pushed_at":"2021-09-09T02:39:15.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T04:32:21.044Z","etag":null,"topics":["babel-plugin-macros"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seanmorris.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":"2020-09-08T21:24:21.000Z","updated_at":"2024-05-02T04:32:21.045Z","dependencies_parsed_at":"2023-01-25T10:45:34.682Z","dependency_job_id":null,"html_url":"https://github.com/seanmorris/rawquire","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmorris%2Frawquire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmorris%2Frawquire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmorris%2Frawquire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmorris%2Frawquire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanmorris","download_url":"https://codeload.github.com/seanmorris/rawquire/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239727025,"owners_count":19687100,"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":["babel-plugin-macros"],"created_at":"2025-02-19T20:19:25.314Z","updated_at":"2026-01-02T11:30:12.374Z","avatar_url":"https://github.com/seanmorris.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rawquire for babel\n\nImport raw plaintext.\n\n## Install with npm:\n\n```sh\n$ npm install babel-plugin-macros --save-dev\n$ npm install rawquire --save-dev\n```\n\n## Add \"macros\" to your `.babelrc`, or preferred babel config:\n\n```json\n{\n\t\"plugins\": [\"macros\"]\n}\n```\n\n## Import raw text into your javascript:\n\nCall `rawquire` with a file path relative to the current script in the source tree.\n\nAny `rawquire` function calls will be replaced with a string literal containing the text from the file.\n\n### Source code:\n\n`hello-world.js`:\n```javascript\nimport { rawquire } from 'rawquire/rawquire.macro';\n\nconst myHtml = rawquire('./hello-world.html');\n\n```\n`hello-world.html`:\n```html\n\u003ch1\u003eHello, world!\u003c/h1\u003e\n```\n\n### Compiled code:\n\n`hello-world.js`:\n```javascript\nconst myHtml = \"\u003ch1\u003eHello, world!\u003c/h1\u003e\";\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanmorris%2Frawquire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanmorris%2Frawquire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanmorris%2Frawquire/lists"}