
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
vue3-migrate
Advanced tools
This is a command-line tool that utilizes ChatGPT to automatically refactor Vue.js code from version 2 to version 3.
This is a command-line tool that utilizes ChatGPT to automatically refactor Vue.js code from version 2 to version 3. It helps developers migrate their code by transforming it to use Typescript with the Composition API.
npm install -g vue3-migrate
To refactor a single Vue file, use the convert
command:
$ vue3-migrate convert <filename> [options]
Replace <filename>
with the path to the Vue file you want to refactor.
-t, --token <token>
: Specify the GPT token (required)-m, --model <model>
: Specify the GPT model to use (default: gpt-3.5-turbo-16k, optional)-p, --prompt <prompt>
: Specify the path to the prompt file (optional)-mt, --max_tokens <max_tokens>
: The GPT max tokens (default: 4096, optional).-r, --replace
: replace exist refactor files.see help: vue3-migrate convert -h
To refactor all Vue files in a directory, use the directory
command:
$ vue3-migrate directory <directory> [options]
Replace <directory>
with the path to the directory containing the Vue files you want to refactor.
-t, --token <token>
: Specify the GPT token (required)-m, --model <model>
: Specify the GPT model to use (default: gpt-3.5-turbo-16k, optional)-p, --prompt <prompt>
: Specify the path to the prompt file (optional)-t, --timeout <timeout>
: The timeout
option allows you to specify the timeout duration in milliseconds between each refactoring request when using the directory
command. It determines the waiting time before sending the next request to the OpenAI API (default: 20 seconds, optional).-mt, --max_tokens <max_tokens>
: The GPT max tokens (default: 4096, optional).-r, --replace
: replace exist refactor files.see help: vue3-migrate convert -h
Refactor a single Vue file:
$ vue3-migrate convert /path/MyView.vue --token=sk-...
Refactor all Vue files in a directory:
$ vue3-migrate directory /path/src/components --token=sk-...
Before running the tool, make sure to set up the following:
This project is licensed under the MIT License.
FAQs
This is a command-line tool that utilizes ChatGPT to automatically refactor Vue.js code from version 2 to version 3.
The npm package vue3-migrate receives a total of 0 weekly downloads. As such, vue3-migrate popularity was classified as not popular.
We found that vue3-migrate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.