Skip to content

Commit 7caf8f6

Browse files
author
Sebastian Schürmann
committed
docs(banira): purge prosaic docs
1 parent 090e82c commit 7caf8f6

File tree

1 file changed

+8
-73
lines changed

1 file changed

+8
-73
lines changed

packages/banira/README.md

+8-73
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,14 @@
11
# banira
22

3-
The core library of the banira.js toolchain, providing essential utilities and runtime support for developing web components using vanilla JavaScript.
3+
The core library of the banira toolchain, providing essential utilities and runtime support for developing web components using vanilla JavaScript.
44

5-
## Classes
6-
7-
### Compiler
8-
The core TypeScript compilation engine that supports both standard and virtual filesystem operations. It provides:
9-
- Flexible compilation with customizable compiler options
10-
- Support for virtual filesystem compilation
11-
- Built-in transformers for ES module compatibility
12-
- Default configuration targeting modern browsers
13-
14-
### TestHelper
15-
A powerful testing utility for web components that provides:
16-
- JSDOM-based testing environment
17-
- Component mounting and initialization
18-
- Support for both pre-compiled and TypeScript components
19-
- Customizable JSDOM options for specific testing needs
20-
21-
### ResultAnalyzer
22-
Analyzes compilation results and provides detailed diagnostics:
23-
- Error and warning categorization
24-
- Formatted diagnostic messages
25-
- Access to compiler output files
26-
- Source file analysis capabilities
27-
28-
### VirtualCompilerHost
29-
A TypeScript compiler host implementation using a virtual filesystem:
30-
- In-memory file operations
31-
- Isolation for testing and development
32-
- Compatible with standard TypeScript compiler API
33-
- Configurable working directory and file structure
34-
35-
## Usage
36-
37-
### Testing Components
38-
39-
```typescript
40-
import { TestHelper } from 'banira';
41-
42-
const helper = new TestHelper();
43-
const context = await helper.mountAsScript('my-component', componentCode);
44-
45-
// Access the mounted component
46-
const component = context.querySelector('my-component');
47-
```
5+
![Diagram](https://mermaid.ink/img/pako:eNplUb1uwyAQfhXrJkey-wAeOnmqFHVIp4gFwflPhrPgUBVFefdisKM4ZYHv57474A6KNEID3Uy_apCOi59W2CIu71RpbrUis5BFyx_sT1mZ_FGYdmGlxhldRppU3aPNgNFzPeC87OrXpf0-l2XaTlu9VsHEQMkj2fKZvwZFw3Oqoq4_31rtKEmTfzcfJtlAFl4aCruXHdL-Df5CJEO6QZagAoPOyFHHF72vnAAe0KCAJh41djLMLEDYR7TKwHS5WQUNu4AVhEVLxnaUvZNmJxdpr0QRdnL2EaMemdw5f1r6uwochX7YHI8_YJeXvA?type=svg)
486

49-
### Virtual Filesystem
50-
51-
```typescript
52-
import { createVirtualFs } from 'banira';
53-
54-
const fs = createVirtualFs({
55-
'/src/component.ts': `
56-
class MyComponent extends HTMLElement {
57-
// component code
58-
}
59-
`
60-
});
61-
```
62-
63-
## API Reference
64-
65-
For detailed API documentation, please refer to the generated API documentation in the project root.
66-
67-
## Dependencies
68-
69-
- jsdom: ^25.0.1
70-
- memfs: ^4.15.1
71-
- typescript: ^5.7.2
72-
73-
## Contributing
74-
75-
This package is part of the banira.js monorepo. Please refer to the main project's README for contribution guidelines.
7+
## Classes
768

77-
## License
9+
| Class | Description |
10+
|----|----|
11+
| Compiler | Uses tsc to compile TypeScript files to Javascript |
12+
| TestHelper | Helper class for testing web components in a JSDOM environment |
13+
| DocGen | Generates html documentation for Webcomponents based on @example tags |
7814

79-
MIT © Sebastian Schürmann

0 commit comments

Comments
 (0)