mirror of
				https://github.com/vuejs/babel-plugin-jsx.git
				synced 2025-11-01 01:42:21 +08:00 
			
		
		
		
	docs: update README
This commit is contained in:
		| @@ -7,14 +7,16 @@ To add Vue JSX support. | |||||||
| Install the plugin with: | Install the plugin with: | ||||||
|  |  | ||||||
| ``` | ``` | ||||||
| npm install @ant-design-vue/babel-plugin-jsx | npm install @ant-design-vue/babel-plugin-jsx -D | ||||||
|  |  | ||||||
|  | npm install @ant-design-vue/babel-helper-vue-transform-on | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| Then add the plugin to .babelrc: | Then add the plugin to .babelrc: | ||||||
|  |  | ||||||
| ``` | ``` | ||||||
| { | { | ||||||
|   "plugins": ["@ant-design-vue/babel-plugin-jsx"] |   "plugins": ["@ant-design-vue/babel-plugin-jsx", { "transformOn": true }] | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,11 +1,5 @@ | |||||||
| # @ant-design-vue/babel-helper-vue-transform-on | # @ant-design-vue/babel-helper-vue-transform-on | ||||||
|  |  | ||||||
| A package used internally by vue jsx transformer to merge props spread. It is required to merge some prop trees like this: | A package used internally by vue jsx transformer to transform events. | ||||||
|  |  | ||||||
| ## Usage | on: { click: xx } --> onClick: xx | ||||||
|  |  | ||||||
| ``` |  | ||||||
| const babelHelperVueTransformOn = require('babel-helper-vue-transform-on'); |  | ||||||
|  |  | ||||||
| // TODO: DEMONSTRATE API |  | ||||||
| ``` |  | ||||||
|   | |||||||
| @@ -1,9 +1,8 @@ | |||||||
| { | { | ||||||
|   "name": "@ant-design-vue/babel-helper-vue-transform-on", |   "name": "@ant-design-vue/babel-helper-vue-transform-on", | ||||||
|   "version": "1.0.0", |   "version": "1.0.1", | ||||||
|   "description": "> TODO: description", |   "description": "to help transform on", | ||||||
|   "author": "Amour1688 <lcz_1996@foxmail.com>", |   "author": "Amour1688 <lcz_1996@foxmail.com>", | ||||||
|   "license": "MIT", |   "license": "MIT", | ||||||
|   "main": "index.js", |   "main": "index.js" | ||||||
|   "private": true |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,11 +1,19 @@ | |||||||
| # `babel-plugin-jsx` | # @ant-design-vue/babel-plugin-jsx | ||||||
|  |  | ||||||
| > TODO: description | To add Vue JSX support. | ||||||
|  |  | ||||||
| ## Usage | ## Installation | ||||||
|  |  | ||||||
|  | Install the plugin with: | ||||||
|  |  | ||||||
| ``` | ``` | ||||||
| const babelPluginJsx = require('babel-plugin-jsx'); | npm install @ant-design-vue/babel-plugin-jsx | ||||||
|  | ``` | ||||||
| // TODO: DEMONSTRATE API |  | ||||||
|  | Then add the plugin to .babelrc: | ||||||
|  |  | ||||||
|  | ``` | ||||||
|  | { | ||||||
|  |   "plugins": ["@ant-design-vue/babel-plugin-jsx"] | ||||||
|  | } | ||||||
| ``` | ``` | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user