Skip to content

Automatically comment your BEM compliant SASS files to add class name comments

License

Notifications You must be signed in to change notification settings

dpellier/bem-comment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bem-comment

A node module that read through some SASS files that follow BEM syntax to automatically add full name class comment above each classes. Make the file much more readable to know the final classes generated.

Installation

  npm install bem-content --save

Usage

  node bem-content <src_file_1> <src_file_2> ...

Example

   /* before */
   .button {
       &__cancel {
           ....
       }

       &--active {
           ....
       }
   }
   /* after */
   // button
   .button {
       // button__cancel
       &__cancel {
           ....
       }

       // button--active
       &--active {
           ....
       }
   }

Tests

   npm test

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Release History

  • 0.1.0 Initial release

About

Automatically comment your BEM compliant SASS files to add class name comments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published