New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wm-hosp/codemod

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wm-hosp/codemod

weimeng codemod

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
0
Weekly downloads
 
Created
Source

WM Codemods

Codemod 是以编程方式在代码库上运行的转换。这允许以编程方式应用大量更改,而无需手动遍历每个文件。

Usage

命令行中,切换到项目目录下,执行:

npx @wm-hosp/codemod <transform> <path>

<transform><path> 替换为对应的值。

  • transform: 所要执行的转换
  • path: 所要执行的转换的文件夹或者文件
  • --dry: 执行转换,但不会实际修改代码
  • --print: 打印出转换后的代码

Transforms

remove-barrel-file-import

移除项目中对 barrel file 文件的引用

npx @wm-hosp/codemod remove-barrel-file-import src --jscodeshift=--barrelFile=src/components/index.ts

一定要指定 --jscodeshift=--barrelFile=src/components/index.ts 参数,否则会导致无法找到 barrel file 文件

FAQs

Package last updated on 27 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc