Skip to content

chaorenluo/magic-turn

Repository files navigation

magic-turn

magic-turn 是一个代码转换器,可以将 Nuxt 2 的代码转换成与 Nuxt 3 兼容的代码。

安装

npm install magic-turn --save-dev 

使用方法

magic-turn

配置

在项目根目录下创建 magic.config.json 文件。

{
  "dataName": "stateData",
  "piniaStore": {
    "aliasPrefix": "~/store",
    "pathVal": "./store"
  },
  "alias": {
    "_MIX_": "./mixin" 
  },
  "output": "../new_www",
  "compileDir": ["components", "pages", "layouts"],
  "labelAttribs": {
    "van-action-sheet": {
      "v-model": "v-model:show"
    },
    "van-dialog": {
      "v-model": "v-model:show"
    }
  }
}

贡献指南

修改代码请阅读赞助指南

License

The MIT License (MIT). Please see License File for more information.

About

代码转换器:适用于 Nuxt 2 转 Nuxt 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published