A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/getyourguide/vue-class-migrator below:

getyourguide/vue-class-migrator: Vue 3 Migration helper for applications using Vue 2.7

Vue Class Migrator is a utility designed to facilitate the migration of Vue and TypeScript files using the @component decorator from vue-class-components to the defineComponent format. Under the hood, it employs ts-morph for parsing and generating files.

You can install vue-class-migrator globally using npm:

npm install -g vue-class-migrator

Accepted options

npm run migrate -- -d <your_path>

The tool also migrates decorators from vuex-class and vue-property-decorator.

If the tool encounters unsupported code in your class, it will produce errors. Monitor the output and verify the generated file. In such cases, you can contribute to the migrator to add support or correct the file manually.

Migration workflow recommendation

Initially, avoid using --sfc directly.

First, run the tool without it and compare the changes in the TS files using version control. If satisfied, discard the changes and rerun with --sfc.

In addition to migrating the class to the defineComponent format, vue-class-migrator also migrates the following libraries out of the box.

Decorator Support @State ❌ Not yet @Getter ✅ @namespace.Getter ❌ Not yet @Action ✅ @Mutation ✅ Decorator Support @Prop ✅ @PropSync ✅ @Model ✅ @ModelSync ✅ @Watch ✅ @Provide ❌ Not yet @Inject ❌ Not yet @ProvideReactive ❌ Not yet @InjectReactive ❌ Not yet @Emit ❌ Not yet @Ref ✅ @VModel ❌ Not yet @Component ✅ @Mixins ✅

For security matters please contact security@getyourguide.com.

Copyright 2023 GetYourGuide GmbH.

vue-class-migrator is licensed under the Apache License, Version 2.0. See LICENSE for the full text.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4