vue-declassify-to-setup
Advanced tools
Comparing version
@@ -239,7 +239,7 @@ #!/usr/bin/env node | ||
{ | ||
// Find const (to reactive) variable with type, for arrays. Multiline | ||
// Find const (to ref) variable with type, for arrays. Multiline | ||
// Ps. sync with: regex_const_ref_after_replace | ||
regex: | ||
/^[ ]{2}(\w+)(: )?(\w+?\[\])* ([A-z0-9\[\]\{\} ."+\-:;,\|\n]*) ?= (\[(.|\n)*?\]);$/gm, | ||
to: " const $1 = reactive<$3>($5);", | ||
to: " const $1 = ref<$3>($5);", | ||
disabled: false, | ||
@@ -246,0 +246,0 @@ }, |
{ | ||
"name": "vue-declassify-to-setup", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"author": "Øystein Tvedten <oystein.tvedten@outlook.com>", | ||
"license": "ISC", | ||
"description": "Converts VUE 2 vue-property-decorator classes to Composition API / setup-API", | ||
"description": "A CLI tool that converts Vue 2 vue-property-decorator classes to Composition API / setup-API.", | ||
"main": "./bin/index.js", | ||
@@ -23,5 +23,15 @@ "files": [ | ||
"class", | ||
"setup", | ||
"object", | ||
"convert", | ||
"property", | ||
"refactor", | ||
"setup-api", | ||
"convertor", | ||
"converter", | ||
"decorator", | ||
"declassify", | ||
"decorators", | ||
"composition", | ||
"composition-api", | ||
"vue-property-decorator" | ||
@@ -28,0 +38,0 @@ ], |
@@ -58,15 +58,15 @@ # Vue 2 vue-property-decorator to Vue 2/3 setup-api converter :rocket: | ||
-d, --destination Specify the path to the destination directory. Defaults to | ||
the current path. | ||
-v, --vue Set the Vue target version. By default, it is set to 2. Use | ||
3 to convert to Vue 3. The difference is related to | ||
v-model. | ||
-g, --grouping Activate the grouping of declarations for refs/reactive. | ||
-n, --no-comment Disable the inclusion of informative comments within the | ||
JavaScript code for importing the modelWrapper. | ||
-d, --destination Specify the path to the destination directory. | ||
Defaults to the current path. | ||
-v, --vue Set the Vue target version. By default, it is set to | ||
2. Use 3 to convert to Vue 3. The difference is | ||
related to v-model. | ||
-g, --grouping Activate the grouping of declarations for refs/ | ||
reactive. | ||
-n, --no-comment Disable the inclusion of informative comments within | ||
the JavaScript code for importing the modelWrapper. | ||
``` | ||
### More example: | ||
``` | ||
vue-convert --path . --destination "./exportfolder" --vue 3 --g -no-comment | ||
vue-convert --path . --destination "./exportfolder" --vue 3 -g -n | ||
``` | ||
@@ -73,0 +73,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
99487
54.64%27
58.82%