auto-bem-scss-commenter
v1.3.0
Published
Automatically comment your BEM compliant SCSS files to add class name comments. (inpired by dpellier/bem-comment)
Downloads
6
Maintainers
Readme
auto-bem-scss-commenter
Automatically comment your BEM compliant SCSS files to add class name comments. (inpired by dpellier/bem-comment)
Installation
Auto-bem-scss-commenter can be installed using
$ npm install --save-dev auto-bem-scss-commenter
Usage
// file.scss
//
.object {
/* styles */
&__child {
/* styles */
&--modifier {
/* styles */
}
}
}
auto-bem-scss-commenter file.scss > file.scss
// file.scss
//
// object
.object {
/* styles */
// object__child
&__child {
/* styles */
// object__child--modifier
&--modifier {
/* styles */
}
}
}
auto-bem-scss-commenter -h
for more info
With Node
var bemComment = require('auto-bem-scss-commenter ');
gulp.task('helper:bem-comment', function () {
return gulp.src(['**/{,*/}/*.scss'], {cwd: options.app})
.pipe(bemComment({ force: true }))
.pipe(gulp.dest(options.app));
});
The force
option force rewrite all comments
License
Copyright © 2014 Douglas Duteil <[email protected]>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENCE file for more details.