Aljeksej Jaroševič

Results 338 comments of Aljeksej Jaroševič

I've pushed a proposal, would be nice to have this.

@Chabane Well, that patch in PR only. Nothing more. Personally we decided to use `rc` (https://www.npmjs.com/package/rc) module, and then we wrote `betterc` (https://www.npmjs.com/package/betterc)

Probably, you couldn't get it because of the rest of file contains streaming game data and to get some information about it you should know how the client react on...

Probably it's easy to do with `ArrayObject` with some extension.

Something like this? ``` php require('vendor/bem/bh/index.php'); $bh = new BEM/BH(); $bh->match('type1', function ($ctx, $json) { $ctx->tag('button'); }); $bh->match('type2', function ($ctx, $json) { $ctx->attrs(['id' => 12]); }); echo $bh->apply([ ['block' =>...

Я хочу выкинуть этот функционал в отдельный модуль, если он кому-то нужен, и делать сборку bemjson.js в bemjson.json при сборке ;-) Т.е. собирать bemjson.js нодой, потому что сейчас ни require,...

@kompolom А он нужен? Просто мы с перепугу сделали парсер js-like синтаксиса, но попарсить json без кавычек это одно, а выполнять js — несколько сложнее)

@kompolom Ты сможешь поставить себе модуль WeakJsonParser? ;-) И пропускать явно через него. Что-то типа: ``` composer require zxqfox/WeakJsonParser ``` ``` php WeakJsonParser::parse(file_get_contents("some.bemjson.js")); ```