Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/douglasduteil/auto-bem-scss-commenter
Automatically comment your BEM compliant SCSS files to add class name comments. (inpired by dpellier/bem-comment)
https://github.com/douglasduteil/auto-bem-scss-commenter
Last synced: about 1 month ago
JSON representation
Automatically comment your BEM compliant SCSS files to add class name comments. (inpired by dpellier/bem-comment)
- Host: GitHub
- URL: https://github.com/douglasduteil/auto-bem-scss-commenter
- Owner: douglasduteil
- License: wtfpl
- Created: 2015-02-11T17:15:17.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-02-23T15:27:37.000Z (almost 7 years ago)
- Last Synced: 2024-10-12T06:27:39.924Z (2 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# auto-bem-scss-commenter [![Build Status][travis-image]][travis-url] [![NPM version][npm-image]][npm-url]
> 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
```sh
$ npm install --save-dev auto-bem-scss-commenter
```## Usage
```scss
// file.scss
//.object {
/* styles */&__child {
/* styles */&--modifier {
/* styles */
}
}
}
``````bash
auto-bem-scss-commenter file.scss > file.scss
``````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
```js
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
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.[npm-url]: https://npmjs.org/package/auto-bem-scss-commenter
[npm-image]: http://img.shields.io/npm/v/auto-bem-scss-commenter.svg
[travis-url]: http://travis-ci.org/douglasduteil/auto-bem-scss-commenter
[travis-image]: http://travis-ci.org/douglasduteil/auto-bem-scss-commenter.svg?branch=master