3h-refactor 中文文档教程

发布于 6年前 浏览 24 项目主页 更新于 3年前

3h-refactor

重构库。

Functionality

  • Find the reference(s) to the src file.
  • Automatically change the import/export statement(s) while moving the src file.

Support info

这是一些支持信息。 请注意,这是默认支持信息,您可以通过修改正则表达式数组来自定义模式。

Statements

该库支持开箱即用的最常见的导入/导出语句。

  • import { ... } from "...";
  • import * from "...";
  • import * as ___ from "...";
  • export { ... } from "...";
  • export * from "...";
  • import ___ = require("...");
  • require("...")
  • <script src="..."></script>

File formats

默认包含具有以下扩展名的文件。

  • .js
  • .jsx
  • .mjs
  • .json
  • .ts
  • .tsx
  • .html
  • .htm

Usage

In your command line

Usage:
  3h-refactor              - Show help info like this.
  3h-refactor <src>        - Show reference(s) to src file.
  3h-refactor <src> <dist> - Change src file to dist file.

In your app

只需阅读 typings 中的声明文件即可了解 API。

3h-refactor

A refactor lib.

Functionality

  • Find the reference(s) to the src file.
  • Automatically change the import/export statement(s) while moving the src file.

Support info

Here is some support info. Please note that this is the default support info, and you can customize the patterns by modifying the regular expression arrays.

Statements

The lib supports most common import/export statements out of the box.

  • import { ... } from "...";
  • import * from "...";
  • import * as ___ from "...";
  • export { ... } from "...";
  • export * from "...";
  • import ___ = require("...");
  • require("...")
  • <script src="..."></script>

File formats

Files with following extensions are included by default.

  • .js
  • .jsx
  • .mjs
  • .json
  • .ts
  • .tsx
  • .html
  • .htm

Usage

In your command line

Usage:
  3h-refactor              - Show help info like this.
  3h-refactor <src>        - Show reference(s) to src file.
  3h-refactor <src> <dist> - Change src file to dist file.

In your app

Just read the declaration files in typings to learn the APIs.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文