Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

A very simple wrapper for html2bemjson and bemjson-to-decl modules.

Usage

Just add a rule to module, like this:

    module: {
       rules: [
           { test: /\.html$/, loader: "html2bemdecl-loader" }
       ]
   }

Now you dont even need to write bemjson/bemdecl by yourself. For example, this input:

<div class="b-block1">
  <div class="b-block1__elem1">test</div>
</div>

Will result in DECL format:

[
   {
       block: 'b-block1'
   },
   {
       block: 'b-block1',
       elem: 'elem1'
   }
]

You can use this DECL to convert it to require statements with bemdecl-to-fs-loader. So you may write only HTML, and all resources will be included automatically based on classes of HTML elements.

The example project is available here. The more information about BEM naming you may find here.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages