Require в bemjson с помощью borschik
- Dominant language
- JavaScript
- Stars
- 312
- Forks
- 189
- PR merge metrics
- No merged PRs in 30d
Description
Гуглил, в целом решения не нашел, кроме как использовать bemtree. Возможно ли проинклюдить в bemjson другой bemjson с учетом того чтобы при сборке так же собирались зависимости инклюд файлов?
Имеется index.bemjson.js в который я хочу во время сборки подтянуть header.bemjson.js в итогде я получил резуальтат инклюда без обработки.
```json
module.exports ={
"block" : "test2",
"content" : "borschik:include:../parts/header/header.bemjson.js"
}
```
### header.bemjson.js
```json
{
"block" : "header",
"content": [{ "elem" : "logo" }]
}
```
### Фрагмент gulpfile.js
```js
html: bundle => {
const bemhtmlApply = () => toHtml(bundle.target('tmpls'));
return gulp.src(bundle.dirname + '/*.bemjson.js')
.pipe(borschik())
.pipe(bemhtmlApply())
}
```
### Получившийся index.html
```html
block: 'header',
content: [{ elem: 'logo'}]
#}]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the html pipeline in gulpfile.js and trace how borschik processes index.bemjson.js before bemhtmlApply renders it. Compare the current output with header.bemjson.js and determine how included BEMJSON dependencies are expected to be handled. Done means the header object is included without appearing as literal text and its dependencies are processed during the build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100