Vue Migrator VS Code Extension
VS Code extension for migrating Vue components to the script setup syntax and converting Vue i18n.
Features
Vue Component Migration
- Convert Vue components to script setup syntax
- Convert props to reactivity syntax
- Batch convert entire folders
- Automatic code formatting after conversion
Vue i18n Migration
- Convert Vue files to use i18n syntax
- Convert entire folders to i18n
- Automatic code formatting after conversion
Usage
Right-click on a Vue file or folder in the explorer to access:
- "Convert to Script Setup" - Converts a single file to script setup syntax
- "Convert Props to Reactivity" - Converts props to reactivity syntax
- "Convert Folder to Script Setup" - Converts all Vue files in a folder
- "Convert Vue i18n" - Converts a single file to i18n syntax
- "Convert i18n Folder" - Converts all Vue files in a folder to i18n syntax
Right-click in the editor to access:
- "Convert to Script Setup" - Converts current file
- "Convert Props to Reactivity" - Converts selected code or entire file
- "Convert Vue i18n" - Converts current file to i18n syntax
Development
Prerequisites
Setup
- Clone the repository
git clone https://github.com/dimgolsh/vscode-vue-migrator.git
cd vscode-vue-migrator
- Install dependencies
npm install
- Build the extension
npm run build
Building VSIX Package
To create a VSIX package for distribution:
- Install vsce globally (if not already installed)
npm install -g @vscode/vsce
- Package the extension
vsce package
This will create a .vsix file in your project directory.
Installing the VSIX
- In VS Code, go to the Extensions view
- Click on the "..." menu (More Actions)
- Select "Install from VSIX..."
- Choose the generated
.vsix file
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
MIT
| |