8000 Merge pull request #28 from hydrosquall/cameron.yick/feature/ignore-f… · githubocto/repo-visualizer@0cd1a63 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0cd1a63

Browse files
author
Amelia Wattenberger
authored
Merge pull request #28 from hydrosquall/cameron.yick/feature/ignore-files-and-folders
feature: add support for ignoring filepaths via micromatch globs
2 parents acf10f6 + cd955d0 commit 0cd1a63

14 files changed

+5466
-81
l 10000 ines changed

.github/workflows/test.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: JS - Unit Tests
2+
3+
on: push
4+
5+
jobs:
6+
7+
run-tests:
8+
name: Unit Tests
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Check out Git repository
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 14
19+
20+
- name: Install dependencies with caching
21+
uses: bahmutov/npm-install@v1
22+
23+
- name: Check types
24+
run: |
25+
yarn run typecheck
26+
27+
- name: Run unit tests
28+
run: |
29+
yarn run test

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
node_modules
1+
node_modules

.npmignore

Whitespace-only changes.

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,33 @@ Default: diagram.svg
1818

1919
## `excluded_paths`
2020

21-
A list of paths to exclude from the diagram, separated by commas.
21+
A list of paths to folders to exclude from the diagram, separated by commas.
2222

2323
For example: dist,node_modules
2424

2525
Default: node_modules,bower_components,dist,out,build,eject,.next,.netlify,.yarn,.vscode,package-lock.json,yarn.lock
2626

27+
## `excluded_globs`
28+
29+
A semicolon-delimited array of file [globs](https://globster.xyz/) to exclude from the diagram, using [micromatch](https://github.com/micromatch/micromatch) syntax. Provided as an array.
30+
31+
For example:
32+
33+
```yaml
34+
excluded_globs: 'frontend/*.spec.js;**/*.{png,jpg};**/!(*.module).ts'
35+
# Guide:
36+
# - 'frontend/*.spec.js' # exclude frontend tests
37+
# - '**/*.{png,ico,md}' # all png, ico, md files in any directory
38+
# - '**/!(*.module).ts' # all TS files except module files
39+
```
40+
2741
## `root_path`
2842

29-
The directory (and its children) that you want to visualize in the diagram.
43+
The directory (and its children) that you want to visualize in the diagram, relative to the repository root.
3044

31-
For example: `./src/`
45+
For example: `src/`
3246

33-
Default: `./`
47+
Default: `''` (current directory)
3448

3549
## `max_depth`
3650

action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ inputs:
88
excluded_paths:
99
description: "A list of paths to exclude from the diagram, separated by commas. For example: dist,node_modules"
1010
required: false
11+
excluded_globs:
12+
description: "A list of micromatch globs to exclude from the diagram, separated by semicolons. For example: **/*.png;docs/**/*.{png,ico}"
13+
required: false
1114
root_path:
12-
description: "The directory (and its children) that you want to visualize in the diagram. Default: ./"
15+
description: 'The directory (and its children) that you want to visualize in the diagram. Default: "" (repository root directory)'
1316
required: false
1417
max_depth:
1518
description: "The maximum number of nested folders to show files within. Default: 9"

0 commit comments

Comments
 (0)
0