Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

demo #4

wants to merge 2 commits into from

Conversation

tadatuta
Copy link
Owner

@tadatuta tadatuta commented May 5, 2015

@@ -46,7 +49,7 @@ module.exports = require('enb/lib/build-flow').create()
return [ctx.BEMTREE, bemhtml.BEMHTML];
})
.spread(function(BEMTREE, BEMHTML) {
return BEMTREE.apply({ block: 'root' })
return BEMTREE.apply({ block: 'root', data: require(dataFilename) })
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сейчас это технология, которая выполняется при enb make и, соответственно, через enb server, но по смыслу ее логика должна быть реализована в продакшен-сервере:

  1. прочитать файлы собранных шаблонов
  2. получить данные (например, из БД)
  3. вызвать apply шаблонов и передать в них необходимые данные

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ВОТ! Вот из таких семплов, как dataFilename, и надо бандлы собирать! Ура!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants