PHPackages                             dehero/fastred-bem - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dehero/fastred-bem

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dehero/fastred-bem
==================

05JavaScript

Since Aug 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/dehero/fastred-bem)[ Packagist](https://packagist.org/packages/dehero/fastred-bem)[ RSS](/packages/dehero-fastred-bem/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Fastred-BEM
===========

[](#fastred-bem)

> Web development bootstrap with extendable BEM blocks, Fastred modules and Webpack configuration.

Based on:

- BEM
- Fastred
- Webpack

Languages:

- Pug
- Stylus
- JavaScript
- PHP

Components:

- pug-php
- Fastred

JavaScript
----------

[](#javascript)

### Requirements

[](#requirements)

- Webpack

### Installation

[](#installation)

```
npm install fastred-bem

```

PHP
---

[](#php)

### Requirements

[](#requirements-1)

- [PHP 5.3+](http://www.php.net/downloads.php)

### Installation

[](#installation-1)

```
composer require dehero/fastred-bem

```

File structure of block
-----------------------

[](#file-structure-of-block)

Common block file structure looks like this:

```
block
|---block.pug
|---block__item.pug
|---block.styl
|---block.js
|---block.json
|---block.css.styl

```

### block.js

[](#blockjs)

```
require('block/block.css.styl');
template('block', require('block/block.pug'));
template('block__item', require('block/block__item.pug'));
```

### block.styl

[](#blockstyl)

Here you declare global stylus variables and mixins and load json with `json` function:

```
$json = json('./block.json', {hash: true})

$block__variable_1 = $json.block__variable_1
$block__variable_2 = #fff

block__mixin()
    color $block__variable_2
```

The file is loaded when you call `@require block` in Stylus files of other blocks.

> Don't put classes inside `block.styl`. If you do this and use `@require block` more than once in your project, these classes will double in the output CSS. `block.css.styl` should be used for defining classes, as it's required only once by `block.js`.

### block.css.styl

[](#blockcssstyl)

Here you declare classes and other stuff that goes to output CSS:

```
@require 'block/block.styl'
@require block1
@require block2

.block
  color $block1__color
  background #fff

  &_dark
    background #000

.block__item
  color $block2__color

  &_size

    &_l
      font-size 1.5rem

    &_xl
      font-size 2rem
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1607322?v=4)[Anton Kuryanov](/maintainers/dehero)[@dehero](https://github.com/dehero)

---

Top Contributors

[![dehero](https://avatars.githubusercontent.com/u/1607322?v=4)](https://github.com/dehero "dehero (153 commits)")

### Embed Badge

![Health badge](/badges/dehero-fastred-bem/health.svg)

```
[![Health](https://phpackages.com/badges/dehero-fastred-bem/health.svg)](https://phpackages.com/packages/dehero-fastred-bem)
```

###  Alternatives

[leancloud/leancloud-sdk

LeanCloud PHP SDK

5232.5k6](/packages/leancloud-leancloud-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
