Download the PHP package jbsnewmedia/bootstrap-bundle without Composer
On this page you can find all versions of the php package jbsnewmedia/bootstrap-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jbsnewmedia/bootstrap-bundle
More information about jbsnewmedia/bootstrap-bundle
Files in jbsnewmedia/bootstrap-bundle
Package bootstrap-bundle
Short Description Lightweight tools to scaffold and compile Bootstrap SCSS using scssphp. Provides console commands (bootstrap:init, bootstrap:compile) with sensible defaults and vendor-aware import paths.
License MIT
Informations about the package bootstrap-bundle
Bootstrap Bundle
A lightweight Symfony bundle that helps you scaffold and compile Bootstrap SCSS with scssphp. It ships three console commands:
bootstrap:init— scaffolds SCSS entry files underassets/scss/.bootstrap:compile— compiles SCSS to CSS (with sensible defaults and vendor‑aware import paths).bootstrap:purge— purges compiled Bootstrap CSS by scanning your templates.
🚀 Features
- Ready‑to‑use SCSS entries (light and dark)
- SCSS → CSS via scssphp (pure PHP, no Node required)
- Writes readable and minified CSS in one run
- Optional source maps for each output (
--source-map) - Include paths for
vendor/twbs/bootstrap/scssout of the box - Purge Bootstrap CSS based on your templates (
bootstrap:purge) - Clean defaults and sensible paths
⚙️ Requirements
- PHP 8.2 or higher
- Symfony 6.4 or 7.x (framework‑bundle, console)
- Composer
- Dependencies:
twbs/bootstrap(>= 5.3)scssphp/scssphp(^2.0)jbsnewmedia/css-purger(^1.0)
Note: This is a regular Symfony bundle and expects a Symfony kernel (it is auto‑registered).
📦 Installation
Install via Composer:
If not already present, Composer will install the required packages (twbs/bootstrap, scssphp/scssphp).
📋 Usage
1) Scaffold SCSS entries
Create the default SCSS entry files under assets/scss/:
Files created:
assets/scss/bootstrap5-custom.scssassets/scss/bootstrap5-custom-dark.scss
Both entries import Bootstrap after your variable overrides in the correct order.
2) Compile SCSS → CSS
Compile with sensible defaults:
Defaults:
- Input:
assets/scss/bootstrap5-custom.scss - Outputs:
- readable CSS →
assets/css/bootstrap.css - minified CSS →
assets/css/bootstrap.min.css
- readable CSS →
Readable output path can be adjusted via --output-normal.
Generate a source map:
Custom input/output paths:
3) Purge unused Bootstrap CSS (optional)
After compiling, you can purge unused selectors by scanning your templates:
🧩 Command reference
bootstrap:init
Scaffolds Bootstrap SCSS entry files.
- Options:
--dry-run— show what would be written without creating files-f, --force— overwrite existing files
- Alias:
boostrap:init(common typo)
Creates the following files in assets/scss/:
bootstrap5-custom.scss(light)bootstrap5-custom-dark.scss(dark)
Recommended order inside the files: functions → your variable overrides → Bootstrap import.
bootstrap:compile
Compiles SCSS to CSS using scssphp.
- Arguments:
input(optional) — SCSS entry file; defaultassets/scss/bootstrap5-custom.scssoutput(optional) — minified CSS output file; defaultassets/css/bootstrap.min.css
- Options:
--output-normal,-O— readable (non‑minified) CSS output path; defaultassets/css/bootstrap.css--source-map— write a.mapfile next to each CSS output (readable and minified)
Preconfigured include paths (in this order):
vendor/twbs/bootstrap/scssvendorassets/scssassets
This allows imports like:
bootstrap:purge
Purges Bootstrap CSS by scanning your templates and keeping only the selectors that are found.
- Options:
--input,-i— path to input CSS file; defaultassets/css/bootstrap.css--output,-o— path to write the purged CSS; defaultassets/css/bootstrap-purged.css--templates-dir— template directories to scan (multiple allowed)--include-dir,-D— additional directories to scan (multiple allowed)--include-file,-F— additional files to scan (multiple allowed)--selector,-S— selectors to always keep (multiple allowed)--readable,-r— generate human‑readable (pretty) CSS output--dry-run— show stats without writing the output file
Source map behavior
When using --source-map, a map is written for each output:
- Readable CSS:
assets/css/bootstrap.css+ mapassets/css/bootstrap.css.map - Minified CSS:
assets/css/bootstrap.min.css+ mapassets/css/bootstrap.min.css.map
Example console output:
If no map is written even though --source-map is set, please check that your SCSS source actually produces output and that the defaults were not overridden.
✍️ Example SCSS
Light (created by bootstrap:init):
Dark (created by bootstrap:init):
🧭 Troubleshooting
- Input file not found
- Run
php bin/console bootstrap:initto create default entries, or pass your own path tobootstrap:compile.
- Run
- Bootstrap imports not resolved
- Ensure
twbs/bootstrapis installed:composer require twbs/bootstrap.
- Ensure
- Source map comment is present, but no file is written
- With the current implementation the map is written after compilation. Check that
--source-mapis set and your SCSS produces content.
- With the current implementation the map is written after compilation. Check that
- scssphp versions
- This bundle targets
scssphp/scssphp^2.0. If you use another major version, adjust accordingly.
- This bundle targets
ℹ️ Git information
- Latest tag:
1.0.2 - Last commit:
ffb3318— 2026-02-09
📜 License
Licensed under the MIT License. See the LICENSE file for details.
Developed by Juergen Schwind and contributors.
🤝 Contribution
Contributions are welcome! Please fork the repository and open a pull request. For larger changes, consider opening an issue first to discuss your idea.
📫 Contact
For questions or issues, please open an issue or a pull request in the repository.
— Simple Bootstrap SCSS scaffolding and compilation, Composer‑native.
All versions of bootstrap-bundle with dependencies
jbsnewmedia/css-purger Version ^1.0
scssphp/scssphp Version ^2.0
symfony/console Version ^7.4
symfony/framework-bundle Version ^7.4
twbs/bootstrap Version ^5.3