Skip to content

feat!: add generic flat bundles, drop bricks-branded bundle - #60

Merged
jackgranatowski merged 1 commit into
mainfrom
flat-bundles
May 22, 2026
Merged

feat!: add generic flat bundles, drop bricks-branded bundle#60
jackgranatowski merged 1 commit into
mainfrom
flat-bundles

Conversation

@kiro-agent

@kiro-agent kiro-agent Bot commented May 22, 2026

Copy link
Copy Markdown

This pull request was created by @kiro-agent on behalf of @jackgranatowski 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent


Replaces the single bricks-branded flat bundle with a generic *.flat.css sibling for every tier, and produces them in dist/.

What changed

bundle.config.jsonslashed.bricks.css removed; five new flat: true entries added:

  • slashed.essential.flat.css
  • slashed.optimal.flat.css (same file set as the old bricks bundle)
  • slashed.optimal-components.flat.css
  • slashed.optimal-utilities.flat.css
  • slashed.full.flat.css

package.json./bricks export removed; replaced with:

  • ./flatslashed.full.flat.css (convenient default)
  • ./essential/flat, ./optimal/flat, ./optimal-components/flat, ./optimal-utilities/flat, ./full/flat

scripts/bundle.js — comment on stripLayerWrappers genericised; no longer Bricks-specific. The flat-emission logic itself is unchanged.

dist/ — stale slashed.bricks.* artefacts deleted; new *.flat.{css,min.css,min.css.map} siblings emitted. Spot-check: slashed.full.flat.css has 0 top-level @layer declarations vs. 17 in slashed.full.css.

Sizes

Bundle min gzip brotli
slashed.essential.flat.min.css 47.7 kB 9.7 kB 8.6 kB
slashed.optimal.flat.min.css 68.1 kB 12.1 kB 10.3 kB
slashed.optimal-components.flat.min.css 68.1 kB 12.1 kB 10.3 kB
slashed.optimal-utilities.flat.min.css 68.1 kB 12.1 kB 10.3 kB
slashed.full.flat.min.css 68.1 kB 12.1 kB 10.3 kB

Tested

  • node scripts/bundle.js succeeds; 10 bundles + 10 minified siblings + source maps emitted.
  • Pre-commit hook ran clean (stylelint scoped via ignoreFiles: ["dist/**"]; rebuild step idempotent).

Breaking change

slashed/bricks is removed from package exports. Migration:

  • import 'slashed/bricks'import 'slashed/optimal/flat' (identical file set), or import 'slashed/flat' for the full flat bundle.

Worth a 0.3.0 bump on next release.

Side note: package-lock.json had its version field bumped from 0.2.50.2.10 to match package.json — that drift was pre-existing and got corrected on npm install.

Summary by CodeRabbit

  • New Features

    • Introduced flat CSS bundle variants for all build distribution options (essential, optimal, optimal-components, optimal-utilities, and full), each with new dedicated package export subpaths for straightforward access.
  • Chores

    • Removed the ./bricks subpath export from the package's available exports.
    • Updated build bundler script documentation.

Review Change Stack

Replace the single slashed.bricks.css flat bundle with a generic
*.flat.css sibling for each tier (essential, optimal,
optimal-components, optimal-utilities, full).

- bundle.config.json: five new flat:true entries; bricks entry removed
- package.json: ./bricks export removed; new ./flat and ./<tier>/flat
  exports added
- scripts/bundle.js: stripLayerWrappers comment genericised
- dist/: stale slashed.bricks.* files removed; new
  *.flat.{css,min.css,min.css.map} siblings emitted

BREAKING CHANGE: the slashed/bricks package export is removed. Use
slashed/optimal/flat (same file set, formerly the bricks bundle) or
the new slashed/flat (full flat bundle) instead.

Co-authored-by: Jack Granatowski <contact@codeslash.net>
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bc3c5852-0bbe-4912-8bd6-d8c336c9e80f

📥 Commits

Reviewing files that changed from the base of the PR and between 0381f44 and cd9dab0.

⛔ Files ignored due to path filters (27)
  • dist/slashed.bricks.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.essential.flat.css is excluded by !**/dist/**
  • dist/slashed.essential.flat.min.css is excluded by !**/dist/**
  • dist/slashed.essential.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.essential.min.css is excluded by !**/dist/**
  • dist/slashed.essential.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.full.flat.css is excluded by !**/dist/**
  • dist/slashed.full.flat.min.css is excluded by !**/dist/**
  • dist/slashed.full.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.full.min.css is excluded by !**/dist/**
  • dist/slashed.full.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal-components.flat.css is excluded by !**/dist/**
  • dist/slashed.optimal-components.flat.min.css is excluded by !**/dist/**
  • dist/slashed.optimal-components.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal-components.min.css is excluded by !**/dist/**
  • dist/slashed.optimal-components.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal-utilities.flat.css is excluded by !**/dist/**
  • dist/slashed.optimal-utilities.flat.min.css is excluded by !**/dist/**
  • dist/slashed.optimal-utilities.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal-utilities.min.css is excluded by !**/dist/**
  • dist/slashed.optimal-utilities.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal.flat.css is excluded by !**/dist/**
  • dist/slashed.optimal.flat.min.css is excluded by !**/dist/**
  • dist/slashed.optimal.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal.min.css is excluded by !**/dist/**
  • dist/slashed.optimal.min.css.map is excluded by !**/dist/**, !**/*.map
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • bundle.config.json
  • package.json
  • scripts/bundle.js

📝 Walkthrough

Walkthrough

This PR extends the CSS bundling pipeline to generate flat (unlayered) CSS variants for all build modes. Five new bundle configurations are added to bundle.config.json, corresponding subpath exports are added to package.json, and a bundler documentation comment is clarified.

Changes

Flat CSS bundle variants

Layer / File(s) Summary
Flat bundle configuration
bundle.config.json
Five new bundle entries define flat CSS outputs (flat: true) for essential, optimal, optimal-components, optimal-utilities, and full variants, each with explicit input file lists matching their non-flat counterparts.
Package exports for flat variants
package.json
The exports map adds six new subpath exports (./essential/flat, ./optimal/flat, ./optimal-components/flat, ./optimal-utilities/flat, ./full/flat, ./flat) to expose the flat bundles as public import paths.
Bundler documentation update
scripts/bundle.js
The stripLayerWrappers comment is rewritten to remove a specific Bricks Builder example reference while keeping the general explanation of why unlayered author CSS should beat named layers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • codeslash-dev/SLASHED#59: Introduces the initial "flat" bundle pipeline; this PR extends it with additional flat bundle variants for all build modes.
  • codeslash-dev/SLASHED#4: Establishes the config-driven CSS bundling system that this PR expands with new flat bundle entries.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: adding generic flat bundles across all tiers and removing the bricks-branded bundle.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch flat-bundles

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant