npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@zcatpkg/gogocode-plugin-element

v1.3.1

Published

## 开始迁移

Downloads

10

Readme

Element to Element Plus 升级插件

开始迁移

Element Plus 稳定版已经正式发布,在使用上与 Element 存在一定的差异。我们根据Element Plus Breaking Changes利用gogocode这个代码转换利器,开发了Element to Element Plus升级插件。这个插件能够快速地把你的 Element 代码升级到 Element Plus。

首先需要确认的是,你的项目是否已经从 Vue2 升级为 Vue3,如果还没有,建议尝试使用Vue2 to Vue3 升级插件来协助你

然后就可以开始进行 对 Element 引用的升级

你也可以参考我们针对 vue-element-admin 项目升级的实战教程:升级 Vue3 的最后一块拼图,快试试这个工具自动升级你的 Element 老项目

安装工具

全局安装最新的 gogocode-cli

npm install gogocode-cli -g

一键升级 Element 的引用代码

执行如下命令:​

注意:-s 后面是原文件的目录/文件名,-o 后面是输出的目录/文件名,如果两者相同,转换插件会覆盖你的代码,在此操作前请做好备份。

gogocode -s ./src -t gogocode-plugin-element -o ./src-out

转换操作执行完毕后新的引用 Element Plus 的代码会被写入到 src-out 目录中。

另外,由于是静态的代码转换,可能你的代码里会有些我们没想到的写法导致转换出乱子,转换后请做好人工比对和测试!发现转换的问题可以提交给我们。

指定应用规则

添加参数 -p include-rules=xxx,yyy,举例只应用 calendarpopover 规则:

gogocode -s ./src -t gogocode-plugin-element -o ./src-out -p include-rules=calendar,popover

规则名称请参看 rules.js 里面的 name 字段。

排除应用规则

添加参数 -p exclude-rules=xxx,yyy,举例只排除 calendarpopover 规则:

gogocode -s ./src -t gogocode-plugin-element -o ./src-out -p exclude-rules=calendar,popover

规则名称请参看 rules.js 里面的 name 字段。

联系我们

如果你在使用过程中遇到其他问题可以通过如下方式联系我们:

github: https://github.com/thx/gogocode/issues

钉钉群:34266233

gogocode 转换问题可以分享https://play.gogocode.io/相关链接给我们

相关文档

Element Plus Breaking Changes