0.0.5 • Published 5 months ago

indexes-ts v0.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

indexes-ts

indexes-ts will create for you index.ts files in directories that you target in a indexes-ts.json file at the root of your project.

Installation

npm install indexes-ts -D

Usage

Config

Create an indexes-ts.json file at the root of your project. This file will contain an array of the directories that you want to index. For example:

[
  "./types",
  {
    "dir": "./stores",
    "ignore": "notThisFile.ts"
  },
  {
    "dir": "./helpers",
    "ignore": [
      "[a-zA-Z]+.old.ts"
    ]
  }
]

You can specify a directory as a string, or as an object with a dir property and an optional ignore property. The ignore property can be a string or an array of strings. It will be used as a regex collection to ignore files in the directory.

Run

Run the following command in your terminal to start scanning the directories you specified in indexes-ts.json:

indexes-ts

You can integrate this command to existing scripts in your package.json file. For example, in a Nuxt project:

{
  "scripts": {
    "dev": "indexes-ts & nuxt dev"
  }
}

dev will now run indexes-ts before starting the Nuxt server, and will watch for changes in the directories you specified in indexes-ts.json.

0.0.5

5 months ago

0.0.1

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.4

5 months ago

1.0.0

1 year ago