Skip to content

Commit fb7041c

Browse files
Copilotjaypatrick
andauthored
Add comprehensive @jk-com/adblock-compiler documentation with CI/CD integration examples (#216)
* Initial plan * Add comprehensive adblock-compiler documentation with CI/CD examples Co-authored-by: jaypatrick <1800595+jaypatrick@users.noreply.github.com> --------- Signed-off-by: Jayson Knight <jayson.knight@jaysonknight.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jaypatrick <1800595+jaypatrick@users.noreply.github.com> Co-authored-by: Jayson Knight <jayson.knight@jaysonknight.com>
1 parent 51240a7 commit fb7041c

5 files changed

Lines changed: 1177 additions & 3 deletions

File tree

.github/copilot-instructions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ Multi-language toolkit for ad-blocking and AdGuard DNS management with **identic
3939
- `adguard-validate` (CLI tool)
4040

4141
### Compiler Equivalence
42-
All four compilers (TypeScript, .NET, Python, Rust) use `@jk-com/adblock-compiler` and **must**:
42+
All four compilers (TypeScript, .NET, Python, Rust) use **[@jk-com/adblock-compiler](https://github.com/jaypatrick/hostlistcompiler)** and **must**:
4343
- Support JSON, YAML, TOML config formats (except PowerShell: JSON only)
4444
- Count rules identically (exclude empty lines and `!`/`#` comments)
4545
- Compute SHA-384 hash of output (96 hex chars)
4646
- Return same result structure: `{ success, ruleCount, hash, elapsedMs, outputPath }`
4747
- **Use centralized validation library** for all security checks
4848

49+
📘 **See [adblock-compiler guide](../docs/guides/adblock-compiler-guide.md)** for package details, benefits, and CI/CD integration examples.
50+
4951
### ConsoleUI DI Pattern
5052
`src/adguard-api-dotnet/src/AdGuard.ConsoleUI/` uses service-oriented architecture:
5153
```

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,17 @@ A comprehensive multi-language toolkit for ad-blocking, network protection, and
4444
| **Rust** | Native binary | Cargo/Binary | Zero-runtime deps, LTO optimization |
4545
| **PowerShell** | PowerShell 7+ | Module | Pipeline-friendly, Pester tests |
4646

47-
All compilers use [@jk-com/adblock-compiler](https://github.com/jaypatrick/hostlistcompiler) with **built-in security validation** and support:
47+
All compilers use **[@jk-com/adblock-compiler](https://github.com/jaypatrick/hostlistcompiler)** - a modern, SOLID-compliant TypeScript package distributed via JSR. [📘 See comprehensive guide →](docs/guides/adblock-compiler-guide.md)
48+
49+
**Why @jk-com/adblock-compiler?**
50+
-**SOLID Architecture**: 8+ specialized classes following Single Responsibility Principle
51+
- 🔧 **Dependency Injection**: Full DI support for testability and customization
52+
- 📘 **Superior Type Safety**: Complete TypeScript interfaces with JSDoc coverage
53+
-**Performance Optimized**: Improved pattern matching and rule processing
54+
- 🎯 **Better Error Handling**: Descriptive errors with context and suggestions
55+
- 📦 **JSR Distribution**: Modern registry with better dependency management
56+
57+
**Compilation Features:**
4858
- **All 11 transformations**: Deduplicate, Validate, RemoveComments, Compress, RemoveModifiers, etc.
4959
- **Multi-format config**: JSON, YAML, and TOML configuration files
5060
- **Source-specific settings**: Per-source transformations, inclusions, exclusions
@@ -568,6 +578,9 @@ All compilers use [@jk-com/adblock-compiler](https://github.com/jaypatrick/adblo
568578
- **All 11 transformations**: Deduplicate, Validate, RemoveComments, Compress, etc.
569579
- **Source-specific settings**: Per-source transformations, inclusions, exclusions
570580
- **Pattern matching**: Wildcards, regex, file-based patterns
581+
- **SOLID Architecture**: Dependency injection, single responsibility, better testing
582+
583+
📘 **[Complete @jk-com/adblock-compiler Guide](docs/guides/adblock-compiler-guide.md)** - Why it's better, CI/CD integration, API reference, migration guide
571584

572585
**AdBlock Compiler Documentation**:
573586
- [Migration Guide](https://github.com/jaypatrick/adblock-compiler/blob/master/docs/MIGRATION.md) - Migrate from @adguard/hostlist-compiler
@@ -1468,7 +1481,8 @@ A user-friendly Gatsby-powered website with:
14681481

14691482
### Rules Compilers
14701483

1471-
- [TypeScript Compiler](src/rules-compiler-typescript/) - Node.js/Deno compiler
1484+
- **[@jk-com/adblock-compiler Guide](docs/guides/adblock-compiler-guide.md)** - Core package documentation with CI/CD examples
1485+
- [TypeScript Compiler](src/rules-compiler-typescript/) - Deno compiler with JSR integration
14721486
- [.NET Compiler README](src/rules-compiler-dotnet/README.md) - C# library and CLI
14731487
- [Python Compiler README](src/rules-compiler-python/README.md) - pip-installable package
14741488
- [Rust Compiler README](src/rules-compiler-rust/README.md) - Single binary distribution

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ This directory contains comprehensive documentation for the ad-blocking reposito
2929
| Guide | Description |
3030
|-------|-------------|
3131
| [Getting Started](getting-started.md) | Installation, prerequisites, and quick start |
32+
| [**@jk-com/adblock-compiler Guide**](guides/adblock-compiler-guide.md) | **Core compilation package with CI/CD examples** |
3233
| [Docker Guide](docker-guide.md) | Using Docker for development |
3334
| [Configuration Reference](configuration-reference.md) | Full configuration schema documentation |
3435
| [Compiler Comparison](compiler-comparison.md) | Feature comparison of all compilers |

0 commit comments

Comments
 (0)