{"id":22945139,"url":"https://github.com/seregpie/vuetexttemplate","last_synced_at":"2025-09-05T10:42:50.364Z","repository":{"id":123101284,"uuid":"137120934","full_name":"SeregPie/VueTextTemplate","owner":"SeregPie","description":"Replaces the tokens inside a text template with the scoped slots.","archived":false,"fork":false,"pushed_at":"2019-03-07T12:07:51.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T14:24:04.733Z","etag":null,"topics":["component","scope","slot","template","text","token","vue"],"latest_commit_sha":null,"homepage":"","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/SeregPie.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":"2018-06-12T19:55:58.000Z","updated_at":"2020-10-03T11:20:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"076e0d59-f6f1-49a8-b426-6531e8b6d775","html_url":"https://github.com/SeregPie/VueTextTemplate","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"948eb83b9f7d084ae05ccee661f81c408019e943"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeregPie%2FVueTextTemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeregPie%2FVueTextTemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeregPie%2FVueTextTemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeregPie%2FVueTextTemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SeregPie","download_url":"https://codeload.github.com/SeregPie/VueTextTemplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246716843,"owners_count":20822529,"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":["component","scope","slot","template","text","token","vue"],"created_at":"2024-12-14T14:29:50.425Z","updated_at":"2025-04-01T21:43:46.409Z","avatar_url":"https://github.com/SeregPie.png","language":"JavaScript","readme":"# VueTextTemplate\n\nReplaces the tokens inside a text template with the scoped slots.\n\n## dependencies\n\n- [renderTemplate](https://github.com/SeregPie/renderTemplate)\n\n## setup\n\n### npm\n\n```shell\nnpm i vuetexttemplate\n```\n\n### ES module\n\nRegister the component globally.\n\n```javascript\nimport Vue from 'vue';\nimport VueTextTemplate from 'vuetexttemplate';\n\nVue.component(VueTextTemplate.name, VueTextTemplate);\n```\n\n*or*\n\nRegister the component in the scope of another component.\n\n```javascript\nimport VueTextTemplate from 'vuetexttemplate';\n\nexport default {\n  components: {\n    [VueTextTemplate.name]: VueTextTemplate,\n  },\n  // ...\n};\n```\n\n### browser\n\n```html\n\u003cscript src=\"https://unpkg.com/vue\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/@seregpie/render-template\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/vuetexttemplate\"\u003e\u003c/script\u003e\n```\n\nIf Vue is detected, the component will be registered automatically.\n\n## usage\n\n```html\n\u003cvue-text-template :template=\"text\"\u003e\n  \u003cmy-icon\n    v-slot=\"index\"\n    :color=\"items[index].color\"\n    :type=\"items[index].icon\"\n  /\u003e\n\u003c/vue-text-template\u003e\n```\n\n```javascript\n// ...\ndata: {\n  text: 'Choose between {{ 0 }}, {{ 1 }} and {{ 2 }}.',\n  items: [\n    {icon: 'train', color: 'red'},\n    {icon: 'tram', color: 'green'},\n    {icon: 'subway', color: 'blue'},\n  ],\n},\n```\n\n## properties\n\n| property | type | default |\n| ---: | :--- | :--- |\n| `regex` | | * |\n| `tag` | `String` | `'div'` |\n| `template` | `String` | `''` |\n\n---\n\n```javascript\nimport renderTemplate from '@seregpie/render-template';\n\nlet regex = function() {\n  return renderTemplate.regex;\n};\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseregpie%2Fvuetexttemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseregpie%2Fvuetexttemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseregpie%2Fvuetexttemplate/lists"}