Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
ExpandOBem is a preprocessing step for HTML that allows you to write BEM-style classes in a shorter, more expressive manner.
ExpandOBem is a preprocessing step for HTML that allows you to write BEM-style classes in a shorter, more expressive manner.
ExpandOBem expands abbreviated BEM-style classes, like so:
<div class='post--featured--recent'></div>
Becomes:
<div class='post post--featured post--recent'></div>
The result is cleaner, more readable source HTML and the speedier switching of modifiers.
npm install expandobem
Install globally to use the CLI. ExpandOBem accepts an input file, or can use stdin. It'll either write to a file you specify or pipe to stdout.
expandobem input.html -o 'output.html'
--element, -e Element syntax
--modifier, -m Modifier syntax
--outfile, -o Write the ExpandOBem output to this file.
If unspecified, ExpandOBem pipes to stdout.
--help, -h Show help
ExpandOBem exposes three methods for processing HTML:
Read a file and transform it.
expandobem.processFile(path, options)
Transform a string.
expandobem.processString(string, options)
Transform streaming HTML.
expandobem.processStream(options)
__
)The connecting syntax prefixing a block or element.
--
)The connecting syntax prefixing a modifier.
npm test
You can use ExpandOBem directly in a Gulp pipeline using the vinyl-transform plugin and ExpandOBem's processStream
function.
var gulp = require('gulp');
var transform = require('vinyl-transform');
var expandobem = require('expandobem');
gulp.src([ '*.html' ])
.pipe(transform(expandobem.processStream))
.pipe(gulp.dest('./build'));
FAQs
ExpandOBem is a preprocessing step for HTML that allows you to write BEM-style classes in a shorter, more expressive manner.
We found that expandobem demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.