Skip to content

Commit

Permalink
changed: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
binjospookie committed Dec 28, 2023
1 parent fa58757 commit bd616ca
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Pure Index supports three ways to define config.
{
"entry": "index.ts",
"exclude": ["node_modules"],
"extensions": ["ts", "tsx"],
"babelPlugins": ["typescript"],
"batch": {
"default": 100
Expand All @@ -70,6 +71,7 @@ Pure Index supports three ways to define config.
"pure-index": {
"entry": "index.ts",
"exclude": ["node_modules"],
"extensions": ["ts", "tsx"],
"babelPlugins": ["typescript"],
"batch": {
"default": 100
Expand All @@ -83,6 +85,7 @@ Pure Index supports three ways to define config.
module.exports = {
entry: 'index.ts',
exclude: ['node_modules'],
extensions: ['ts', 'tsx'],
babelPlugins: ['typescript'],
batch: {
default: 100
Expand All @@ -94,6 +97,7 @@ module.exports = {

- `entry (String)` — path to the package index file. relative to the package directory.
- `exclude (Array<string>)` — list of directories that will be excluded when searching for imports.
- `extensions (Array<string>)` — list of file extensions to be considered during the search..
- `babelPlugins (Array<string>)` — list of babel plugins that will be used when parsing files.
- `batch.default (Number)` — number of files to be traversed in parallel. changing the value may speed up or slow down the script. choose the value yourself.

Expand All @@ -103,8 +107,6 @@ Allows to override the config values for package.

### `--entry, -e`

Sets specific value for _entry_

```diff
"scripts": {
"build": "webpack ./webpack.config.js",
Expand All @@ -114,6 +116,17 @@ Sets specific value for _entry_
}
```

### `--extensions, -x`

```diff
"scripts": {
"build": "webpack ./webpack.config.js",
- "check-exports": "pure-index",
+ "check-exports": "pure-index --extensions js,jsx,ts,tsx",
"test": "vitest"
}
```

### `--collect-usages, -u`

Outputs a list of all unique uses of the package.
Expand Down

0 comments on commit bd616ca

Please sign in to comment.