first
This commit is contained in:
56
node_modules/@vue/babel-preset-jsx/README.md
generated
vendored
Normal file
56
node_modules/@vue/babel-preset-jsx/README.md
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
## @vue/babel-preset-jsx
|
||||
|
||||
Configurable preset for Vue JSX plugins.
|
||||
|
||||
### Babel Compatibility Notes
|
||||
|
||||
- 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)
|
||||
|
||||
### Usage
|
||||
|
||||
Install the dependencies:
|
||||
|
||||
```sh
|
||||
# for yarn:
|
||||
yarn add @vue/babel-preset-jsx @vue/babel-helper-vue-jsx-merge-props
|
||||
# for npm:
|
||||
npm install @vue/babel-preset-jsx @vue/babel-helper-vue-jsx-merge-props --save
|
||||
```
|
||||
|
||||
In your `babel.config.js`:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
presets: ['@vue/babel-preset-jsx'],
|
||||
}
|
||||
```
|
||||
|
||||
You can toggle specific features, by default all features (except `compositionAPI`) are enabled, e.g.:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@vue/babel-preset-jsx',
|
||||
{
|
||||
vModel: false,
|
||||
compositionAPI: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
Options are:
|
||||
|
||||
- `compositionAPI` - Enables [@vue/babel-sugar-composition-api-inject-h](../babel-sugar-composition-api-inject-h) and [@vue/babel-sugar-composition-api-render-instance](../babel-sugar-composition-api-render-instance), support returning render function in `setup`.
|
||||
- The default value is `false`;
|
||||
- When set to `'auto'` (or `true`), it will detect the Vue version in the project. If it's >= 2.7, it will import the composition utilities from `vue`, otherwise from `@vue/composition-api`;
|
||||
- When set to `'native'` (or `'naruto'`), it will always import the composition utilities from `vue`
|
||||
- When set to `plugin`, it will always import the composition utilities from `@vue/composition-api`, but it will redirect to `'vue'` itself when the vue version is `2.7.x`
|
||||
- When set to `vue-demi`, it will always import the composition utilities from `vue-demi`
|
||||
- When set to an object like `{ importSource: string; }`, it will always import the composition utilities from the importSource you set
|
||||
- `functional` [@vue/babel-sugar-functional-vue](../babel-sugar-functional-vue/README.md) - Functional components syntactic sugar
|
||||
- `injectH` [@vue/babel-sugar-inject-h](../babel-sugar-inject-h/README.md) - Automatic `h` injection syntactic sugar
|
||||
- `vModel` [@vue/babel-sugar-v-model](../babel-sugar-v-model/README.md) - `vModel` syntactic sugar
|
||||
- `vOn` [@vue/babel-sugar-v-on](../babel-sugar-v-on/README.md) - `vOn` syntactic sugar
|
1
node_modules/@vue/babel-preset-jsx/dist/plugin.cjs.js
generated
vendored
Normal file
1
node_modules/@vue/babel-preset-jsx/dist/plugin.cjs.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
"use strict";function _interopDefault(a){return a&&"object"==typeof a&&"default"in a?a["default"]:a}var babelPluginTransformVueJsx=_interopDefault(require("@vue/babel-plugin-transform-vue-jsx")),babelSugarFunctionalVue=_interopDefault(require("@vue/babel-sugar-functional-vue")),babelSugarInjectH=_interopDefault(require("@vue/babel-sugar-inject-h")),babelSugarCompositionApiInjectH=_interopDefault(require("@vue/babel-sugar-composition-api-inject-h")),babelSugarCompositionApiRenderInstance=_interopDefault(require("@vue/babel-sugar-composition-api-render-instance")),babelSugarVModel=_interopDefault(require("@vue/babel-sugar-v-model")),babelSugarVOn=_interopDefault(require("@vue/babel-sugar-v-on")),index=(a,{functional:b=!0,injectH:c=!0,vModel:d=!0,vOn:e=!0,compositionAPI:f=!1}={})=>{let g=babelSugarInjectH,h="@vue/composition-api";if(f){if(["native","naruto"].includes(f)&&(h="vue"),"vue-demi"===f&&(h="vue-demi"),["auto",!0].includes(f))try{const a=require("vue/package.json").version;a.startsWith("2.7")&&(h="vue")}catch(a){}"object"==typeof f&&f.importSource&&(h=f.importSource),g=[babelSugarCompositionApiInjectH,{importSource:h}]}return{plugins:[b&&babelSugarFunctionalVue,c&&g,d&&babelSugarVModel,e&&babelSugarVOn,f&&[babelSugarCompositionApiRenderInstance,{importSource:h}],babelPluginTransformVueJsx].filter(Boolean)}};module.exports=index;
|
74
node_modules/@vue/babel-preset-jsx/package.json
generated
vendored
Normal file
74
node_modules/@vue/babel-preset-jsx/package.json
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"_from": "@vue/babel-preset-jsx@^1.1.2",
|
||||
"_id": "@vue/babel-preset-jsx@1.4.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-QmfRpssBOPZWL5xw7fOuHNifCQcNQC1PrOo/4fu6xlhlKJJKSA3HqX92Nvgyx8fqHZTUGMPHmFA+IDqwXlqkSA==",
|
||||
"_location": "/@vue/babel-preset-jsx",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@vue/babel-preset-jsx@^1.1.2",
|
||||
"name": "@vue/babel-preset-jsx",
|
||||
"escapedName": "@vue%2fbabel-preset-jsx",
|
||||
"scope": "@vue",
|
||||
"rawSpec": "^1.1.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@vue/babel-preset-app"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.4.0.tgz",
|
||||
"_shasum": "f4914ba314235ab097bc4372ed67473c0780bfcc",
|
||||
"_spec": "@vue/babel-preset-jsx@^1.1.2",
|
||||
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\@vue\\babel-preset-app",
|
||||
"author": {
|
||||
"name": "Nick Messing",
|
||||
"email": "dot.nick.dot.messing@gmail.com"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
|
||||
"@vue/babel-plugin-transform-vue-jsx": "^1.4.0",
|
||||
"@vue/babel-sugar-composition-api-inject-h": "^1.4.0",
|
||||
"@vue/babel-sugar-composition-api-render-instance": "^1.4.0",
|
||||
"@vue/babel-sugar-functional-vue": "^1.4.0",
|
||||
"@vue/babel-sugar-inject-h": "^1.4.0",
|
||||
"@vue/babel-sugar-v-model": "^1.4.0",
|
||||
"@vue/babel-sugar-v-on": "^1.4.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Babel preset for Vue JSX",
|
||||
"devDependencies": {
|
||||
"rollup": "^0.67.4",
|
||||
"rollup-plugin-babel-minify": "^6.2.0"
|
||||
},
|
||||
"files": [],
|
||||
"gitHead": "6566e12067f5d6c02d3849b574a1b84de5634008",
|
||||
"license": "MIT",
|
||||
"main": "dist/plugin.cjs.js",
|
||||
"name": "@vue/babel-preset-jsx",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0",
|
||||
"vue": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"vue": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vuejs/jsx/tree/master/packages/babel-preset-jsx"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"prerelease": "yarn build"
|
||||
},
|
||||
"version": "1.4.0"
|
||||
}
|
Reference in New Issue
Block a user