Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>pg-transformNew to Visual Studio Code? Get it now.
pg-transform

pg-transform

pg-transform

|
192 installs
| (0) | Free
借助百度翻译api实现中英文互转小插件,写代码终于不用在切换到翻译去了
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

1、全局脚手架安装

npm install -g yo generator-code

2、创建项目

yo code

3、功能开发

4、发布

  • 1、先注册一个微软的账号
  • 2、创建访问令牌 token
  • 3、不管是打包还是发布都需要安装一个发布工具 vsce

同时都需要关联远端 Git 仓库(package.json / repository)

  npm install -g vsce
  • 4、同样使用 vsce 提供的命令来创建发布者
vsce create-publisher [publisher-name]
  • 5、若已有发布账号可直接登录
vsce login [publisher-name]
  • 6、重新发布
vsce publish

o76cdneqcwhwonquklk2t5yasjpithi7tq7n2eqo5x2uasbabodq

工具类

  • 判断是否存在中文
let isChn = (str: string) => /^[\u4E00-\u9FA5]+$/.test(str)
  • 字符串第一个大写转小写
firstCapitalizeTurnSmall = (str: string) => {
  let newStr: string = "";
  for (var i = 0; i < str.length; i++) {
    if (i === 0) {
      newStr += str[i][0].toLowerCase()
    } else {
      newStr += str[i]
    }
  }
  return newStr
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft