{"id":15287797,"url":"https://github.com/mitscherlich/babel-sugar-v-bind-sync","last_synced_at":"2025-04-13T06:05:28.518Z","repository":{"id":36981862,"uuid":"338845756","full_name":"Mitscherlich/babel-sugar-v-bind-sync","owner":"Mitscherlich","description":"Babel syntactic sugar for v-bind sync modifier support in Vue JSX","archived":false,"fork":false,"pushed_at":"2024-03-21T02:56:26.000Z","size":887,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T06:05:00.968Z","etag":null,"topics":["babel-syntactic-sugar","jsx","vue-jsx"],"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/Mitscherlich.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}},"created_at":"2021-02-14T16:15:59.000Z","updated_at":"2024-01-12T18:18:05.000Z","dependencies_parsed_at":"2024-02-25T11:23:39.916Z","dependency_job_id":"35339988-edbb-420d-9ec5-9a160731f2a2","html_url":"https://github.com/Mitscherlich/babel-sugar-v-bind-sync","commit_stats":{"total_commits":192,"total_committers":3,"mean_commits":64.0,"dds":0.5416666666666667,"last_synced_commit":"7202c33ed31864e817d08e9a2e9cc2c3970fa7fd"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mitscherlich%2Fbabel-sugar-v-bind-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mitscherlich%2Fbabel-sugar-v-bind-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mitscherlich%2Fbabel-sugar-v-bind-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mitscherlich%2Fbabel-sugar-v-bind-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mitscherlich","download_url":"https://codeload.github.com/Mitscherlich/babel-sugar-v-bind-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670437,"owners_count":21142904,"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-syntactic-sugar","jsx","vue-jsx"],"created_at":"2024-09-30T15:37:35.960Z","updated_at":"2025-04-13T06:05:28.467Z","avatar_url":"https://github.com/Mitscherlich.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-sugar-v-bind-sync\n\nSyntactic sugar for v-bind `sync` modifier in JSX.\n\n## Babel Compatibility Notes\n\nThis repo is only compatible with Babel 7.x, for 6.x please use [njleonzhang/babel-plugin-vue-jsx-sync](https://github.com/njleonzhang/babel-plugin-vue-jsx-sync)\n\n## Usage\n\nInstall the dependencies:\n\n```sh\n# for yarn:\nyarn add -D babel-sugar-v-bind-sync\n# for npm:\nnpm install babel-sugar-v-bind-sync --save-dev\n```\n\nIn your `.babelrc`:\n\n```js\nmodule.exports = {\n  plugins: [require('babel-sugar-v-bind-sync')]\n}\n```\n\n## Details\n\nThis plugin adds v-bind `sync` modifier to the JSX and tries to mirror the same behavior as in vue-template-compiler, with a few differences:\n\n1. You should use underscore (`_`) instead of dot (`.`) for `sync` modifier (`prop_sync={this.bar}`).\n2. It is recommended to use camelCase version of it (`propName_sync`) in JSX, but you can use kebab-case too (`prop-name_sync`).\n\n```jsx\nexport default {\n  data() {\n    return {\n      bar: 'naz',\n    };\n  },\n  render(h) {\n    return (\n      \u003cdiv\u003e\n        \u003ccomponent foo_sync={this.bar} /\u003e\n      \u003c/div\u003e\n    );\n  },\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitscherlich%2Fbabel-sugar-v-bind-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitscherlich%2Fbabel-sugar-v-bind-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitscherlich%2Fbabel-sugar-v-bind-sync/lists"}