# walk-from-entry

> walk a monorepo from entry

Latest version **0.2.0** (published 2021-07-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install walk-from-entry
pnpm add walk-from-entry
yarn add walk-from-entry
bun add walk-from-entry
```

Provides the command `walk-from-entry`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2021-07-27 |
| First published | 2021-04-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Messi Li |
| Maintainers | messi.li |
| Keywords | build, node |

## Links

- npm: https://www.npmjs.com/package/walk-from-entry
- Repository: https://github.com/licaomeng/build-entry
- Homepage: https://github.com/licaomeng/build-entry#readme
- Issues: https://github.com/licaomeng/build-entry/issues
- npm.io page: https://npm.io/package/walk-from-entry

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^4.1.1
- [micromatch](https://npm.io/package/micromatch.md) ^4.0.4
- [folder-hash](https://npm.io/package/folder-hash.md) ^4.0.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2021-07-27
- 0.1.0 — 2021-07-26
- 0.0.1-beta.6 — 2021-07-23
- 0.0.1-beta.5 — 2021-05-29
- 0.0.1-beta.4 — 2021-05-11
- 0.0.1-beta.3 — 2021-04-30
- 0.0.1-beta.2 — 2021-04-29
- 0.0.1 — 2021-04-29
- 0.0.1-beta.0 — 2021-04-29

## README

# walk-from-entry

Walk through a monorepo to execute commands like `npm run build` `npm run test`, provides multiple modes such as `--fast`, `--full`, `--incremental, -inc`

## Synopsis

`npx walk-from-entry <command> <command-mode> [command-arg]...`

- `<command>`: build, test, lint...
- `<command-mode>`: --fast, --full, --incremental/-inc (default to be --incremental/-inc)
- `[command-arg]`: --no-hash/-n

## Usage

1. Switch to your entry directory.
2. Run the command `npx walk-from-entry build`

> The above command is equivalent to incrementally executing `npm run build` across all dependencies packages in the monorepo (`npx walk-from-entry build --incremental`, `npx walk-from-entry build -inc`).

3. Create a `.walkignore` under the entry directory to ignore the path you'd like to skip. The `.walkignore` looks like:

```
*/**/foo*
*/**/bar*
*/**/baz*
```

> The ignore wildcard function leverage the open-source project [micromatch](https://github.com/micromatch/micromatch), for more matching feature detail, please see [here](https://github.com/micromatch/micromatch#matching-features).

## Description

### < command >

<command> can fill the slot `npm run <command>`

```json
"scripts": {
  "build": "...",
  "test": "...",
  "lint": "...",
},
```

### < command-mode >

- `--fast` - only for no dist dependencies, if you execute `npx walk-from-entry build --fast`, it will just build the packages that have no dist folder.
- `--full` - fully execute the command.
- `-inc, --incremental` - incrementally execute the command. The mode defaults to be`--incremental`. ie, `npx walk-from-entry build` is equivalent to `npx walk-from-entry build --incremental` or `npx walk-from-entry build -inc`. The mechanism of the incremental build is generating a source code hash file `__hash.json` in dist folder. Once run it again, compare the previous one and the current one, to determine building it or skip.

### [command-arg]

- `-n, --no-hash` - won't generate `__hash.json` in dist folder, applicable to idempotent commands like `lint`, `test`. Whereas `build`, `lint:fix` are not applicable.

## License

[MIT](https://github.com/licaomeng/walk-from-entry/blob/master/LICENSE)

---
_Source: https://npm.io/package/walk-from-entry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
