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

Add support for merge bemdecl #92

Closed
wants to merge 2 commits into from

Conversation

vovieque
Copy link

Add support for use https://github.com/enb-bem/enb-bem-techs#mergedeps tech with bemdecl files.
For example, the result of https://github.com/enb-bem/enb-bem-techs#levelstobemdecl can be used for merging with deps file.

@blond
Copy link
Member

blond commented Dec 22, 2014

Hello! Can you tell your case for which you want merge BEMDECL with DEPS?

Maybe you just need to rewrite the bundle declaration from DEPS to BEMDECL format?

@vovieque
Copy link
Author

Hi!
We used the next config:

// Собираем полный файл со всеми депсами
[ bemTechs.depsOld, { target: 'full-?.deps.js' } ],
// Копируем deps-файл из common-бандла
[ bemTechs.provideDeps, {
    node: commonBundleDir,
    target: 'common.deps.js'
} ],
// Вычитаем из полного файла со всеми депсами депсы, которые уже есть в common (их собирать не нужно)
[ bemTechs.subtractDeps, {
    what: 'common.deps.js',
    from: 'full-?.deps.js',
    target: '?.deps.js'
} ],
// Собираем bemdecl всех БЭМ-сущностей только из уровеня проекта
[ bemTechs.levelsToBemdecl, { target: 'only-?.bemdecl.js', source: 'only-?.levels' } ],
// Добавляем к депсам, полученным после вычитания, все БЭМ-сущности только из уровеня проекта,
// т.к. они могли удалиться при вычитании.
[ bemTechs.mergeDeps, {
    sources: ['only-?.bemdecl.js', '?.deps.js'],
    target: 'merged-?.deps.js'
} ],

We don't use the levelsToBemdecl tech (and therefore, mergeDeps with bemdecl) now.

But the result of levelsToBemdecl as deps-file is useful for manipulation with another deps (for example, results of subtractDeps or mergeDeps).
May be add levelsToDeps tech (without bemdecl target, with all BEM entities from levels)?

@blond blond mentioned this pull request Jan 2, 2015
@blond
Copy link
Member

blond commented Jan 2, 2015

Closed in favor of #95

@blond blond closed this Jan 2, 2015
@vovieque
Copy link
Author

vovieque commented Jan 2, 2015

Thank you!

@blond
Copy link
Member

blond commented Jan 13, 2015

Released in v1.0.2.

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