{"id":21541513,"url":"https://github.com/reshape/eval-code","last_synced_at":"2025-07-16T11:32:20.194Z","repository":{"id":57354545,"uuid":"90081980","full_name":"reshape/eval-code","owner":"reshape","description":"evaluate all code nodes and transform to text nodes","archived":false,"fork":false,"pushed_at":"2018-04-05T20:05:10.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T20:21:31.127Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reshape.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","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-02T22:03:40.000Z","updated_at":"2018-09-25T02:31:04.000Z","dependencies_parsed_at":"2022-09-12T04:10:34.639Z","dependency_job_id":null,"html_url":"https://github.com/reshape/eval-code","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshape%2Feval-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshape%2Feval-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshape%2Feval-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshape%2Feval-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reshape","download_url":"https://codeload.github.com/reshape/eval-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226126268,"owners_count":17577480,"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-11-24T05:04:56.612Z","updated_at":"2024-11-24T05:04:58.278Z","avatar_url":"https://github.com/reshape.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reshape Eval Code\n\n[![npm](https://img.shields.io/npm/v/reshape-eval-code.svg?style=flat-square)](https://npmjs.com/package/reshape-eval-code)\n[![tests](https://img.shields.io/travis/reshape/eval-code.svg?style=flat-square)](https://travis-ci.org/reshape/eval-code?branch=master)\n[![dependencies](https://img.shields.io/david/reshape/eval-code.svg?style=flat-square)](https://david-dm.org/reshape/eval-code)\n[![coverage](https://img.shields.io/codecov/c/github/reshape/eval-code.svg?style=flat-square)](https://codecov.io/gh/reshape/eval-code)\n\nEvaluate all code nodes and transform to text nodes\n\n\u003e **Note:** This project is in early development, and versioning is a little different. [Read this](http://markup.im/#q4_cRZ1Q) for more details.\n\n### Installation\n\n`npm install reshape-eval-code -S`\n\n### Usage\n\nIf you have your locals and want to resolve them early so that subsequent plugins can use them directly instead of running into `code` nodes, reshape eval code is your friend. It's a very simple plugin, you just feed it your locals and it will go through all code nodes and resolve them, then run whatever they produce through a parse so that even if you produce html with your code nodes it will still come out as a full reshape AST.\n\n```js\nconst reshape = require('reshape')\nconst expressions = require('reshape-expressions')\nconst evalCode = require('reshape-eval-code')\n\nreshape({ plugins: [expressions(), evalCode({ foo: 'bar' })] })\n  .process('\u003cp\u003e{{ foo }}\u003c/p\u003e')\n  .then((res) =\u003e {\n    console.log(res.output()) // no locals required here! nice!\n  })\n```\n\n### License \u0026 Contributing\n\n- Details on the license [can be found here](LICENSE.md)\n- Details on running tests and contributing [can be found here](contributing.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freshape%2Feval-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freshape%2Feval-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freshape%2Feval-code/lists"}