Skip to content

Cronos87/bem-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

BEM Syntax Analyzer

A simple script that parse a website and analyse BEM usage.

Dependency

BeautifulSoup4 - See https://pypi.python.org/pypi/beautifulsoup4

Launch script from terminal

python bem_analyzer.py http://www.site.com

This command will print something like this:

Element found without a block: tag-list__item
Multiple element found: article__body__link
Modifier found without its element: tag-list__item--first
3 errors found!

The first error mean that tag-list__item has no parent called tag-list.

The second error mean that article__body__link mustn't have multiple element.

These selectors are good:

  • article__body
  • article__link

The third error mean tag-list__item--first must have tag-list__item in the same class attribut.

Example:

<div class="tag-list__item tag-list__item--first"></div>

Compatibility

Python 2 and Python 3.

Tested with versions 2.7.6 and 3.4.3.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages