{"name":"@vue/babel-sugar-v-on","version":"1.3.0","description":"Babel syntactic sugar for v-model support in Vue JSX","main":"dist/plugin.js","repository":{"type":"git","url":"https://github.com/vuejs/jsx/tree/master/packages/babel-sugar-v-on"},"author":{"name":"Nick Messing","email":"dot.nick.dot.messing@gmail.com"},"license":"MIT","private":false,"publishConfig":{"access":"public"},"scripts":{"pretest:snapshot":"yarn build:test","test:snapshot":"nyc --reporter=html --reporter=text-summary ava -v test/snapshot.js","pretest:functional":"yarn build:test && nyc --reporter=html --reporter=text-summary babel test/functional.js --plugins ./dist/plugin.testing.js,./node_modules/@vue/babel-plugin-transform-vue-jsx/dist/plugin.js,@babel/plugin-transform-arrow-functions --out-file test/functional-compiled.js","test:functional":"ava -v test/functional-compiled.js","build":"rollup -c","build:test":"rollup -c rollup.config.testing.js","test":"rm -rf coverage* && yarn test:snapshot && mv coverage coverage-snapshot && yarn test:functional && mv coverage coverage-functional","prepublish":"yarn build"},"devDependencies":{"@babel/cli":"^7.2.0","@babel/core":"^7.2.0","@babel/plugin-transform-arrow-functions":"^7.12.1","@babel/preset-env":"^7.2.0","@vue/test-utils":"^1.0.0-beta.26","ava":"^0.25.0","jsdom":"^13.0.0","jsdom-global":"^3.0.2","ninos":"^2.0.2","nyc":"^13.1.0","rollup":"^0.67.4","rollup-plugin-babel":"4.0.3","rollup-plugin-babel-minify":"^6.2.0","rollup-plugin-istanbul":"^2.0.1","vue":"^2.5.17","vue-template-compiler":"^2.5.17"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.2.0","@vue/babel-plugin-transform-vue-jsx":"^1.2.1","camelcase":"^5.0.0"},"peerDependencies":{"@babel/core":"^7.0.0-0"},"nyc":{"exclude":["dist","test"]},"gitHead":"f82f6182d294632a2cbddaacdff0a506c09e4ddc","_id":"@vue/babel-sugar-v-on@1.3.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/3.20.2/node@v16.15.0+arm64 (darwin)","dist":{"integrity":"sha512-8VZgrS0G5bh7+Prj7oJkzg9GvhSPnuW5YT6MNaVAEy4uwxRLJ8GqHenaStfllChTao4XZ3EZkNtHB4Xbr/ePdA==","shasum":"d35756f8720e527a3b1867e21c3c248cde47ca87","tarball":"http://registry-npm.ywwl.com/@vue/babel-sugar-v-on/download/@vue/babel-sugar-v-on-1.3.0.tgz","fileCount":3,"unpackedSize":7381,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0VigLyoSjcEjfSTgZImv2W1ai/AlE0EFoduemxECgyAiBnCs8O0Gl1qbI9nAWaoELdcE0zh72WIjhVJKAHtRF6ig=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixTuOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhwRAAhCaLXTKgHkKQkkvblZWGORc5d25M/a33cio1g1VoYfoY5A4c\r\nP8Yk9yjvBZjzqyTL719tTaczTGYOWJoqbdUNMrBOu0gzGOcovDlMneJz27j6\r\nPUG3TNu2heAqd4SDhM1IS0rV+GFhMTgjepiwSeQqQrpylTVnqrhH+7hjuXCf\r\nE0kjxmtbn+YGJx38Wdbsm6vcv7/66xVme0XAZTFeO/9nEhQrF7CaO1TqRGZk\r\ngD+sU0powSvfiVav7lwyMj+1PPvSs6tJ4dxYgPFCgEWb/zsCnxKBp2L9B2ZD\r\nMxVLDwu3dahniZC2oGpNBZmWsSaUzLVhLtdc52ucAD45PBSaBxN6VVgI4/Zw\r\n3jABLRgJ17DkDX6dIuzrouw/0Ra3g20QKMHU1+T+8UENTzkpGCDJuAn/AGw4\r\nmUVdInbJipT8JdrMXisHGMVT86iFyZJKe4KrES9och5VdRryaAVSAMCHCn9n\r\nwJ1k16BKmPbULRDH0gSokFGjp/tCCv6OFYHhp09eJ3OxD6taMm7qy38TMgBk\r\n1RuS7AZSzNrLYCrsqfm8aSMetxzbLXNbGY7FF/66BdXC0OZgXBJZYWAlhTVC\r\n8VdwuH0puKiTerXf6UvNpudsypljEgqB71Jev7bMieLJDyUp+410WW1XhdpR\r\n63fVk7Ezo6nZF7XiW5DGKUwRSc7lib2ZFoQ=\r\n=5KAr\r\n-----END PGP SIGNATURE-----\r\n","size":3182,"noattachment":false,"key":"/@vue/babel-sugar-v-on/-/@vue/babel-sugar-v-on-1.3.0.tgz"},"_npmUser":{"name":"soda","email":"haoqunjiang+npm@gmail.com"},"directories":{},"maintainers":[{"name":"nickmessing","email":"dot.nick.dot.messing@gmail.com"},{"name":"soda","email":"haoqunjiang+npm@gmail.com"},{"name":"yyx990803","email":"yyx990803@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-sugar-v-on_1.3.0_1657093006445_0.4711583797060612"},"_hasShrinkwrap":false,"readme":"## @vue/babel-sugar-v-on\n\nSyntactic sugar for v-on in JSX.\n\n### Babel Compatibility Notes\n\n- This repo is only compatible with Babel 7.x, for 6.x please use [vuejs/babel-plugin-transform-vue-jsx](https://github.com/vuejs/babel-plugin-transform-vue-jsx)\n\n### Usage\n\nInstall the dependencies:\n\n```sh\n# for yarn:\nyarn add @vue/babel-sugar-v-on\n# for npm:\nnpm install @vue/babel-sugar-v-on --save\n```\n\nIn your `.babelrc`:\n\n```json\n{\n  \"plugins\": [\"@vue/babel-sugar-v-on\"]\n}\n```\n\nHowever it is recommended to use the [configurable preset](../babel-preset-jsx/README.md) instead.\n\n### Details\n\nThis plugin adds v-on to the JSX and tries to mirror the same behaviour as in vue-template-compiler, with a few differences:\n\n1.  You should use underscore (`_`) instead of dot (`.`) for modifiers (`vOn:click_prevent={this.test}`)\n2.  It is recommended to use camelCase version of it (`vOn`) in JSX, but you can use kebab-case too (`v-on`).\n\n```js\nexport default {\n  methods: {\n    test() {\n      console.log('Hello World')\n    },\n  },\n  render(h) {\n    return (\n      <div>\n        <a href=\"https://vuejs.org\" vOn:click={this.test}>Vue</a>\n      </div>\n    )\n  },\n}\n```\n","publish_time":1657093006619,"_cnpm_publish_time":1657093006619,"dist-tags":{"latest":"1.4.0"}}