Skip to content

Commit eb64311

Browse files
committed
build(build): 💚 Added unbuild as build system
1 parent b519647 commit eb64311

File tree

7 files changed

+630
-26
lines changed

7 files changed

+630
-26
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ node_modules
66

77
# Build
88
dist
9+
coverage
910

1011
.npmrc

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
# @itpropro/tree-structure-ts
22

3+
![npm (scoped)](https://img.shields.io/npm/v/@itpropro/tree-structure-ts)
4+
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@itpropro/tree-structure-ts)
5+
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/itpropro/tree-structure-ts/publish)
6+
![Code Coverage](https://img.shields.io/badge/coverage->95%25-green)
7+
38
## Introduction
49

510
This module help interacting with `Tree` structures. It is optimized to work with big trees without causing overflows. Therefore it doesn't use recursion and the implementations for `preOrder` and `postOrder` traversals use `Promise.all` for concurrency to traverse multiple nodes at ones.
611
It is fully typed and has over 95% test coverage.
712

8-
- Zero dependency
9-
- Fully typed
10-
- Fast
11-
- No recursion -> no memory overflows
13+
🚀 Zero dependency<br>
14+
🏷️ Fully typed<br>
15+
✨ Optimized for big trees<br>
16+
🚧 No recursion -> no memory overflows<br>
17+
🤏 Small bundle size<br>
1218

1319
## Installation
1420

docs/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@
22

33
# @itpropro/tree-structure-ts
44

5+
![npm (scoped)](https://img.shields.io/npm/v/@itpropro/tree-structure-ts)
6+
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@itpropro/tree-structure-ts)
7+
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/itpropro/tree-structure-ts/publish)
8+
![Code Coverage](https://img.shields.io/badge/coverage->95%25-green)
9+
510
## Introduction
611

712
This module help interacting with `Tree` structures. It is optimized to work with big trees without causing overflows. Therefore it doesn't use recursion and the implementations for `preOrder` and `postOrder` traversals use `Promise.all` for concurrency to traverse multiple nodes at ones.
813
It is fully typed and has over 95% test coverage.
914

10-
- Zero dependency
11-
- Fully typed
12-
- Fast
13-
- No recursion -> no memory overflows
15+
🚀 Zero dependency<br>
16+
🏷️ Fully typed<br>
17+
✨ Optimized for big trees<br>
18+
🚧 No recursion -> no memory overflows<br>
19+
🤏 Small bundle size<br>
1420

1521
## Installation
1622

docs/classes/Tree.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Creates a new `Tree` instance.
4747

4848
#### Defined in
4949

50-
[Tree.ts:16](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/Tree.ts#L16)
50+
[Tree.ts:16](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/Tree.ts#L16)
5151

5252
## Properties
5353

@@ -59,7 +59,7 @@ The root node of the tree.
5959

6060
#### Defined in
6161

62-
[Tree.ts:10](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/Tree.ts#L10)
62+
[Tree.ts:10](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/Tree.ts#L10)
6363

6464
## Methods
6565

@@ -75,7 +75,7 @@ Returns all the nodes of the tree in an array.
7575

7676
#### Defined in
7777

78-
[Tree.ts:70](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/Tree.ts#L70)
78+
[Tree.ts:70](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/Tree.ts#L70)
7979

8080
___
8181

@@ -99,4 +99,4 @@ calling the provided callback function on each visited node.
9999

100100
#### Defined in
101101

102-
[Tree.ts:27](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/Tree.ts#L27)
102+
[Tree.ts:27](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/Tree.ts#L27)

docs/classes/TreeNode.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Creates a new TreeNode instance.
5656

5757
#### Defined in
5858

59-
[TreeNode.ts:25](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L25)
59+
[TreeNode.ts:25](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L25)
6060

6161
## Properties
6262

@@ -68,7 +68,7 @@ The children of the node.
6868

6969
#### Defined in
7070

71-
[TreeNode.ts:13](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L13)
71+
[TreeNode.ts:13](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L13)
7272

7373
___
7474

@@ -80,7 +80,7 @@ The parent of the node.
8080

8181
#### Defined in
8282

83-
[TreeNode.ts:18](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L18)
83+
[TreeNode.ts:18](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L18)
8484

8585
___
8686

@@ -92,7 +92,7 @@ The value of the node.
9292

9393
#### Defined in
9494

95-
[TreeNode.ts:8](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L8)
95+
[TreeNode.ts:8](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L8)
9696

9797
## Methods
9898

@@ -116,7 +116,7 @@ The new child node.
116116

117117
#### Defined in
118118

119-
[TreeNode.ts:36](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L36)
119+
[TreeNode.ts:36](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L36)
120120

121121
___
122122

@@ -134,7 +134,7 @@ An array of TreeNode instances.
134134

135135
#### Defined in
136136

137-
[TreeNode.ts:46](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L46)
137+
[TreeNode.ts:46](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L46)
138138

139139
___
140140

@@ -152,7 +152,7 @@ An array of TreeNode instances.
152152

153153
#### Defined in
154154

155-
[TreeNode.ts:59](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L59)
155+
[TreeNode.ts:59](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L59)
156156

157157
___
158158

@@ -170,7 +170,7 @@ Checks if the current node has any child nodes.
170170

171171
#### Defined in
172172

173-
[TreeNode.ts:75](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L75)
173+
[TreeNode.ts:75](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L75)
174174

175175
___
176176

@@ -188,7 +188,7 @@ Checks if the current node has any siblings.
188188

189189
#### Defined in
190190

191-
[TreeNode.ts:83](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L83)
191+
[TreeNode.ts:83](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L83)
192192

193193
___
194194

@@ -206,7 +206,7 @@ Checks if the current node is the root node.
206206

207207
#### Defined in
208208

209-
[TreeNode.ts:91](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L91)
209+
[TreeNode.ts:91](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L91)
210210

211211
___
212212

@@ -224,7 +224,7 @@ The new current node after removing the current node.
224224

225225
#### Defined in
226226

227-
[TreeNode.ts:99](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L99)
227+
[TreeNode.ts:99](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L99)
228228

229229
___
230230

@@ -247,4 +247,4 @@ Traverses the tree starting from the current node.
247247

248248
#### Defined in
249249

250-
[TreeNode.ts:119](https://github.com/itpropro/tree-structure-ts/blob/5c909cf/src/TreeNode.ts#L119)
250+
[TreeNode.ts:119](https://github.com/itpropro/tree-structure-ts/blob/b519647/src/TreeNode.ts#L119)

package.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
{
22
"name": "@itpropro/tree-structure-ts",
3-
"version": "0.3.0",
3+
"version": "0.5.0",
44
"type": "module",
55
"packageManager": "[email protected]",
6+
"files": [
7+
"dist"
8+
],
9+
"exports": {
10+
".": {
11+
"import": "./dist/index.mjs",
12+
"require": "./dist/index.cjs"
13+
}
14+
},
15+
"main": "./dist/index.cjs",
16+
"types": "./dist/index.d.ts",
617
"scripts": {
718
"test": "vitest",
819
"coverage": "vitest run --coverage",
9-
"build": "tsc",
20+
"build": "unbuild",
1021
"typecheck": "tsc --noEmit",
1122
"bump": "changelogen --bump",
1223
"publish": "pnpm publish",
@@ -22,6 +33,7 @@
2233
"typedoc": "^0.23.21",
2334
"typedoc-plugin-markdown": "^3.14.0",
2435
"typescript": "^4.9.3",
36+
"unbuild": "^1.0.2",
2537
"vitest": "^0.25.5"
2638
}
2739
}

0 commit comments

Comments
 (0)