Skip to content

Commit 181a92b

Browse files
committed
set publishing and building
1 parent f106ce1 commit 181a92b

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ console.log(buttonRoleElements.all()); // -> [button]
2121
## Features
2222

2323
You can create a `TargetWindow` instance with `createTargetWindow` which you'll use to query elements by role.
24+
2425
You can use `.queryByRole()` to get elements by their ARIA role, and you can filter them by various options such as `name`, `pressed`, `selected`, `busy`, and `expanded`.
26+
2527
Matched elements are returned as a `QueryResult` instance, which provides some methods to access the elements.
2628

2729
```ts

jsr.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "@mehm8128/query-by-role",
3+
"version": "0.2.3",
4+
"license": "MIT",
5+
"exports": "./src/index.ts",
6+
"publish": {
7+
"include": ["src/**/*.ts", "package.json", "README.md", "LICENSE"],
8+
"exclude": ["src/**/*.test.ts"]
9+
}
10+
}

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
"author": "mehm8128",
1010
"license": "MIT",
1111
"description": "queryByRole for browser.",
12-
"files": [
13-
"dist",
14-
"package.json"
15-
],
12+
"files": ["dist", "package.json", "README.md", "LICENSE"],
1613
"exports": {
1714
".": {
1815
"types": "./dist/index.d.ts",
@@ -24,7 +21,7 @@
2421
"main": "./dist/index.js",
2522
"module": "./dist/index.mjs",
2623
"scripts": {
27-
"build": "tsup ./src",
24+
"build": "tsup",
2825
"typecheck": "tsgo --noEmit src",
2926
"biome": "biome check --write src",
3027
"biome:ci": "biome ci src",

src/queryResult.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export class QueryResult {
33
constructor(elements: Element[]) {
44
this.elements = elements
55
}
6-
get length() {
6+
get length(): number {
77
return this.elements.length
88
}
99
all(): Element[] {

tsup.config.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { defineConfig } from "tsup";
1+
import { defineConfig } from 'tsup'
22

33
export default defineConfig({
4-
target: "esnext",
5-
format: ["cjs", "esm"],
6-
clean: true,
7-
dts: true,
8-
});
4+
target: 'esnext',
5+
format: ['cjs', 'esm'],
6+
clean: true,
7+
dts: true,
8+
entry: ['src', '!src/**/*.test.ts']
9+
})

0 commit comments

Comments
 (0)