EN RU
Forum

Methodology

Technology

Toolbox

Libraries

Tutorials

Building a bundle

Bundle Is the file obtained as a result of the assembly of the project source files.

To build a bundle, you need a list of the BEM entities and levels with the source code for the blocks.

The list of BEM entities is commonly referred to as the declaration and described in the BEMDECL format, for example:

exports.blocks = [
    { name: 'input' },
    { name: 'button' },
    { name: 'checkbox' }
];

Example of building a bundle

The example shows how to build a bundle for a project:

.enb/
└── make.js          # The ENB config file
blocks/              # blocks level
├── input/
    ├── input.deps.js
    ├── input.css
    └── input.js
├── button/
    ├── button.deps.js
    ├── button.css
    └── button.js
└── checkbox/
    ├── checkbox.deps.js
    ├── checkbox.css
    └── checkbox.js
bundle/
└── bundle.bemdecl.js # List of BEM entities

To build a bundle, you need to complete the following steps: