Skip to content

Commit

Permalink
show how to use two folders, closes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Oct 4, 2023
1 parent 715795d commit 7528af6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ If a source file or a spec have syntax that cannot be parsed, they are ignored.

- repo [bahmutov/taste-the-sauce-test-ids](https://github.com/bahmutov/taste-the-sauce-test-ids)

### Find sources in two folders

Let's say we want to find data attributes in all source files in the subfolders `pages` and `components`.

```
$ npx find-ids --sources '{pages,components}/**/*.jsx'
```

## Small print

Author: Gleb Bahmutov <gleb.bahmutov@gmail.com> © 2023
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"test:watch": "ava -w",
"semantic-release": "semantic-release",
"demo:sources": "DEBUG=changed-test-ids node ./bin/find-ids --sources 'tests/fixtures/*.jsx'",
"demo:sources:separate": "DEBUG=changed-test-ids node ./bin/find-ids --sources 'tests/fixtures/{hello.jsx,person.jsx}'",
"demo:specs": "DEBUG=changed-test-ids node ./bin/find-ids --specs 'tests/fixtures/*.cy.{js,ts}' --command getTest,findById",
"demo:warn": "DEBUG=changed-test-ids node ./bin/find-ids --sources 'tests/fixtures/*.jsx' --specs 'tests/fixtures/*.cy.js' --command getTest,findById",
"demo:changed": "DEBUG=changed-test-ids node ./bin/find-ids --branch main --sources 'tests/fixtures/*.jsx' --specs 'tests/fixtures/*.cy.js' --command getTest,findById",
Expand Down

0 comments on commit 7528af6

Please sign in to comment.