@nlib/indexen

0.2.9 • Public • Published

@nlib/indexen

Test codecov

A command line tool to generate index files.

Usage

Usage: npx @nlib/indexen [options] <patterns...>

Arguments:
  patterns                     Patterns of files to be included. It will be passed to fast-glob.

Options:
  -o, --output <path>          A path where the result is written to.
  -e, --exclude <patterns...>  Patterns of files to be excluded. It will be passed to fast-glob.
  --noext                      It true, the output will be [export * from "./a"] not [export * from
                               "./a.js"].
  -V, --version                output the version number
  -h, --help                   display help for command

Assume you have files below:

src/file1.ts
src/file1.test.ts
src/file2.ts
src/dir1/file3.ts
src/dir1/file4.ts
src/dir2/file5.ts
src/file6.private.ts

Then execute @nlib/indexen:

npx @nlib/indexen --output src/index.ts "src/**"

@nlib/indexen generates src/index.ts:

// Generated by @nlib/indexen
export * from 'src/file1.ts';
export * from 'src/file2.ts';
export * from 'src/dir1/file3.ts';
export * from 'src/dir1/file4.ts';
export * from 'src/dir2/file5.ts';

Readme

Keywords

none

Package Sidebar

Install

npm i @nlib/indexen

Weekly Downloads

26

Version

0.2.9

License

Apache-2.0

Unpacked Size

19.2 kB

Total Files

9

Last publish

Collaborators

  • kei-ito