Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxpoletaev/node-beml
HTML preprocessor for BEM
https://github.com/maxpoletaev/node-beml
Last synced: about 2 months ago
JSON representation
HTML preprocessor for BEM
- Host: GitHub
- URL: https://github.com/maxpoletaev/node-beml
- Owner: maxpoletaev
- Created: 2014-01-19T14:28:12.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-03-19T09:37:29.000Z (over 5 years ago)
- Last Synced: 2024-05-18T20:25:02.067Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 36.1 KB
- Stars: 64
- Watchers: 8
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BEML [![Build Status][build]][build-link]
[build]: https://travis-ci.org/zenwalker/node-beml.png?branch=master
[build-link]: https://travis-ci.org/zenwalker/node-bemlThis is simple HTML preprocessor (or postprocessor) which extend HTML syntax for
comfortable working with bem html.Also available plugins for [Gulp](https://github.com/zenwalker/gulp-beml),
[Grunt](https://github.com/zenwalker/grunt-beml), [Broccoli](https://github.com/Inzephirum/broccoli-beml) and [Postxml](https://github.com/postxml/postxml-beml).## Why?
Raw HTML in BEM style is difficult to read. Also, I (and not only I) love HTML
and don't want to use BEMHTML, BEMJSON and others specific technologies.## Targets
* Maximum simplicity - HTML syntax, without translate from another language.
* Possibility port to other languages (e.g. PHP or Python).
* Joint work with template engines.
* Ease of use.## Sample
```html
```translated to
```html
```## How to use
```javascript
var beml = require('beml');var config = {
elemPrefix: '__',
modPrefix: '_',
modDlmtr: '_'
};var html = beml('
', config);
console.log(html);
```## Syntax reference
### Blocks
```html
``````html
```### Elements
```html
``````html
```### Modifiers
```html
``````html
```### Mixes
```html
``````html
```For complex values you can use pseudo JSON syntax:
```html
``````html
```