0.2.0 • Published 4 years ago
walk-from-entry v0.2.0
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
- Switch to your entry directory.
- Run the command
npx walk-from-entry build
The above command is equivalent to incrementally executing
npm run buildacross all dependencies packages in the monorepo (npx walk-from-entry build --incremental,npx walk-from-entry build -inc).
- Create a
.walkignoreunder the entry directory to ignore the path you'd like to skip. The.walkignorelooks like:
*/**/foo*
*/**/bar*
*/**/baz*The ignore wildcard function leverage the open-source project micromatch, for more matching feature detail, please see here.
Description
< command >
can fill the slot npm run <command>
"scripts": {
"build": "...",
"test": "...",
"lint": "...",
},< command-mode >
--fast- only for no dist dependencies, if you executenpx 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 buildis equivalent tonpx walk-from-entry build --incrementalornpx walk-from-entry build -inc. The mechanism of the incremental build is generating a source code hash file__hash.jsonin 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.jsonin dist folder, applicable to idempotent commands likelint,test. Whereasbuild,lint:fixare not applicable.
License
0.2.0
4 years ago
0.1.0
4 years ago
0.0.1-beta.6
4 years ago
0.0.1-beta.5
4 years ago
0.0.1-beta.4
4 years ago
0.0.1-beta.3
5 years ago
0.0.1-beta.2
5 years ago
0.0.1
5 years ago
0.0.1-beta.0
5 years ago