@yutahaga/generate-es-index

0.1.4 • Public • Published

generate-es-index

指定した Glob パターンに従って索引ファイルを生成します。

インストール

yarn add @yutahaga/generate-es-index

使い方

node node_modules/.bin/generate-es-index.js -v -i src/components/**/*.vue -o src/components/index.ts

または package.jsonscripts フィールドに

{
  "scripts": {
    "index":
      "generate-es-index -v -i src/components/**/*.vue -o src/components/index.ts"
  }
}

のように記載し、書きのように実行してください。

yarn index

出力例

export { default as Foo } from './foo/Foo.vue';
export { default as Bar } from './bar/Bar.vue';
export { default as hogeHoge } from './hoge/hoge-hoge.vue';

コマンドライン引数

-v, --verbose

生成したファイル一覧などを標準出力に出力します。

-i [glob pattern], --input [glob pattern]

索引したいファイルの Glob パターンを指定できます。

-o [file path], --output [file path]

出力するファイルのファイルパスを指定します。

-c [directory path], --cwd [directory path]

入出力の基準となるディレクトリを指定できます。

Readme

Keywords

none

Package Sidebar

Install

npm i @yutahaga/generate-es-index

Weekly Downloads

0

Version

0.1.4

License

MIT

Unpacked Size

45.4 kB

Total Files

6

Last publish

Collaborators

  • yutahaga