Registry / devops / gulp-bem-bundler-fs

gulp-bem-bundler-fs

JSON →
library0.0.10jsnpmunverified

gulp-bem-bundler-fs is a Gulp plugin designed to process BEM (Block, Element, Modifier) entities by reading them directly from the filesystem. It integrates into a Gulp build pipeline to facilitate the bundling of BEM-structured projects, often used in conjunction with `gulp-bem-bundle-builder` to manage dependencies and construct output files like CSS or JavaScript. The package, at version 0.0.10, is part of an older `gulp-bem` ecosystem. Its primary function is to create a stream of BEM bundles from specified filesystem paths, which can then be piped to other Gulp plugins for further processing. Development on this standalone package ceased, with the repository marked as deprecated and moved to a monorepo structure within `bem/gulp-bem` since March 2018. Consequently, it has no ongoing release cadence and is not recommended for new projects. It requires Node.js environments `>= 4.0`, an EOL version from 2018, making it incompatible with modern Node.js releases and potentially exposing projects to security vulnerabilities from unmaintained dependencies.

npm install gulp-bem-bundler-fs
INSTALL
IMPORT
SIG · GULP-BEM-BUNDLER-F
G
gulp-bem-bundler-fs
devopsjavascriptv0.0.10
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bundler
const bundler = require('gulp-bem-bundler-fs');
import bundler from 'gulp-bem-bundler-fs';
This package is a CommonJS module, designed for Node.js environments that predate widespread ESM adoption. Use `require()` for importing the default function.
bundler
const bundler = require('gulp-bem-bundler-fs');
const { bundler } = require('gulp-bem-bundler-fs');
The package exports a single default function, not named exports. Destructuring will result in `undefined`.
Type definitions
// No TypeScript type definitions are provided or maintained for this package.
Due to its age and abandonment, there are no official or community-maintained TypeScript type definitions available for `gulp-bem-bundler-fs`.

This quickstart demonstrates how to use `gulp-bem-bundler-fs` with `gulp-bem-bundle-builder` and `gulp-concat` to process BEM-structured files from the filesystem into concatenated CSS and JavaScript bundles. It sets up two Gulp tasks, one for CSS and one for JS, and a default task to run both.

const gulp = require('gulp'); const bundler = require('gulp-bem-bundler-fs'); const Builder = require('gulp-bem-bundle-builder'); const concat = require('gulp-concat'); // Define your BEM levels and techMap as per your project structure const builder = Builder({ levels: [ 'blocks', 'components' ], techMap: { js: ['vanilla.js', 'browser.js', 'js'], css: ['styl', 'css'] } }); // Gulp task to build CSS bundles from BEM entities gulp.task('build:css', () => { return bundler('bundles/*') // Reads BEM bundles from the 'bundles' directory .pipe(builder({ // Passes bundles to the builder for processing css: bundle => bundle.src('css').pipe(concat('bundle.css')) // Gathers CSS files and concatenates them })) .pipe(gulp.dest('./dist/css')); // Outputs the final CSS bundles }); // Gulp task to build JS bundles from BEM entities gulp.task('build:js', () => { return bundler('bundles/*') // Reads BEM bundles from the 'bundles' directory .pipe(builder({ // Passes bundles to the builder for processing js: bundle => bundle.src('js').pipe(concat('bundle.js')) // Gathers JS files and concatenates them })) .pipe(gulp.dest('./dist/js')); // Outputs the final JS bundles }); // Default task to run both CSS and JS builds gulp.task('default', gulp.parallel('build:css', 'build:js'));
Debug
Known issues
breakingThe `gulp-bem-bundler-fs` package is officially deprecated and its repository has been moved to a monorepository structure within `bem/gulp-bem`. The standalone package is no longer maintained.
fix
Migrate to modern bundling tools or investigate the `bem/gulp-bem` monorepo for the current recommended approach, although that project also shows limited recent activity.
affects: >=0.0.10
gotchaThis package explicitly requires Node.js `>= 4.0`. Node.js 4.x reached End-of-Life in 2018 and is not compatible with modern JavaScript features or secure environments. Using this package will necessitate an extremely old Node.js version, which is highly discouraged.
fix
Avoid using this package in any environment requiring modern Node.js or security compliance. Consider alternative BEM-aware build tools or a different build methodology.
affects: >=0.0.10
gotchaGiven its abandonment, this package and its transitive dependencies likely contain numerous unpatched security vulnerabilities. Using it in a production environment poses significant risks.
fix
Do not use this package for new projects. For existing projects, conduct a thorough security audit of its dependency tree and migrate to a actively maintained solution.
affects: >=0.0.10
deprecatedThe entire `gulp-bem` ecosystem, including `gulp-bem-bundler-fs`, appears to be largely inactive or abandoned. Relying on this ecosystem for new development is not advisable due to lack of support and outdated practices.
fix
Explore modern build tools and component-based architectures that offer similar capabilities for dependency resolution and asset bundling, such as Webpack, Rollup, or Vite, possibly with custom plugins for BEM-specific logic if absolutely necessary.
affects: >=0.0.10
Errors
Common errors & fixes
TypeError: bundler is not a function
Attempting to import `gulp-bem-bundler-fs` using ES module syntax (e.g., `import bundler from 'gulp-bem-bundler-fs'`) instead of CommonJS `require()`, or destructuring a non-existent named export.
fix
Ensure you are using `const bundler = require('gulp-bem-bundler-fs');` in your Gulpfile, which should typically be a CommonJS module.
Error: Cannot find module 'gulp-bem-bundle-builder'
The `gulp-bem-bundler-fs` package is often used with `gulp-bem-bundle-builder`, but `gulp-bem-bundle-builder` has not been installed or is not correctly resolved.
fix
Install the required peer/conceptual dependency: `npm install --save-dev gulp-bem-bundle-builder`.
Error: node-sass: `libsass` bindings not found. Try `npm rebuild node-sass`?
While not directly from `gulp-bem-bundler-fs`, old Gulp setups (like those using this package) often rely on deprecated versions of `node-sass` or other native addons that fail to build on newer Node.js versions.
fix
This specific error indicates incompatibility with your Node.js version. Your best option is to upgrade to a modern build system; if forced to use this package, you might need to install a specific (and very old) Node.js version compatible with the native modules.
Upgrade
Version history
0.0.10latest on npm
Audit
Dependencies
gulprequiredThis is a Gulp plugin, requiring Gulp as a peer dependency for operation within a Gulp build system.
gulp-bem-bundle-builderoptionalCommonly used in conjunction with this package to process the BEM bundles created by gulp-bem-bundler-fs.
gulp-concatoptionalFrequently used to concatenate the output streams generated after BEM processing.
Agent activity
8 hits · last 30 days
node
8
Resources