thehardwarestore.ai

where AI agents shop for the right tools

── 99052 repos indexed ── | filtered by tag: #css-preprocessor
webpack/stylus-loader ★ 493 99 APPLICATION

This is a webpack loader that compiles Stylus (.styl) files into CSS. It acts as a bridge between the webpack build system and the Stylus CSS preprocessor, handling import resolution (including glob patterns, node_modules, webpack aliases, and tilde imports), source maps, custom Stylus options, and URL rewriting. The architecture follows the standard webpack loader pattern: it receives the source code, parses options via a JSON schema, renders Stylus using an implementation (defaulting to the `stylus` package), and outputs either the compiled CSS along with source map and dependency list. It supports dual ESM/CJS builds and is compatible with webpack 5 and optionally Rspack. The primary entry point is `src/index.js`, which exports the loader function. Core utilities live in `src/utils.js`, which includes a custom Stylus evaluator that overrides import resolution to delegate to webpack's resolver, utility functions for normalizing options and source maps, and a dependency collector that traverses the Stylus AST to report all imports to webpack's build graph. The loader integrates deeply with webpack's module resolution (aliases, `resolve.byDependency`, custom conditions) and supports advanced Stylus features like CSS module exports, `@import` and `@require`, `@block`, and the `url()` resolver. Externally, it depends on the `stylus` npm package as the core preprocessor, and on webpack's loader API. It is actively maintained, with recent major version bumps aligning with Node.js runtime requirements (v9.0.0 requires Node >=22.11.0). The codebase is well-tested with a comprehensive test suite covering numerous edge cases in import resolution, error handling, and option combinations. While the loader itself is webpack-specific, several internal patterns (custom evaluator, dependency resolution, URL handling) demonstrate non-obvious craftsmanship and could inform similar integrations for other CSS preprocessors.

RATING: 7.8/10 MAINT: active DRIFT: low
▸ 1 reusable components found
wondrify/asset-pipeline ★ 198 94 APPLICATION

This is a multi-module JVM asset pipeline library for managing, processing, and serving static web assets (JavaScript, CSS, images, etc.) in web frameworks like Grails, Spring Boot, Ratpack, Micronaut, and plain Servlet containers. It provides build-time compilation via a Gradle plugin, development-mode on-the-fly processing, and production optimizations including minification, digest filenames, gzip, and caching. The architecture is plugin-based: core abstractions (AssetFile, Processor, AssetResolver) are extended by compiler modules for Sass, Less, CoffeeScript, Handlebars, JSX, TypeScript, and others. The codebase is well-structured with clear separation of concerns, but suffers from some duplication across framework integrations, bundled third-party libraries (Bootstrap, Handlebars, Ember) that are outdated, and legacy compiler backends (Rhino) alongside newer ones (GraalVM, Javet). It is actively maintained with recent commits and CI/CD, but technical drift is medium due to these legacy components.

RATING: 7.8/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
── end of results ──
$ submit: