Created
August 10, 2016 01:38
-
-
Save belozer/c1c7a47ecb75af8e8db1085b3b72726c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var techs = { | |
// essential | |
fileProvider: require('enb/techs/file-provider'), | |
fileMerge: require('enb/techs/file-merge'), | |
// optimization | |
borschik: require('enb-borschik/techs/borschik'), | |
// css | |
css: require('enb-css/techs/css'), | |
postcss: require('enb-bundle-postcss/techs/enb-bundle-postcss'), | |
// js | |
browserJs: require('enb-js/techs/browser-js'), | |
bemBabel: require('enb-bem-babel/techs/bem-babel'), | |
// bemtree | |
bemtree: require('enb-bemxjst/techs/bemtree'), | |
// bemhtml | |
bemhtml: require('enb-bemxjst/techs/bemhtml'), | |
bemjsonToHtml: require('enb-bemxjst/techs/bemjson-to-html') | |
}; | |
var bemTechs = require('enb-bem-techs'); | |
var levels = [ | |
{path: 'libs/bem-core/common.blocks', check: false}, | |
{path: 'libs/bem-core/desktop.blocks', check: false}, | |
{path: 'libs/bem-components/common.blocks', check: false}, | |
{path: 'libs/bem-components/desktop.blocks', check: false}, | |
{path: 'libs/bem-components/design/common.blocks', check: false}, | |
{path: 'libs/bem-components/design/desktop.blocks', check: false}, | |
{path: 'libs/bem-forms/common.blocks', check: true}, | |
'blocks/@common', | |
'blocks/@desktop' | |
]; | |
module.exports = function(config) { | |
var isProd = process.env.YENV === 'production'; | |
config.nodes('bundles/*', function(nodeConfig) { | |
nodeConfig.addTechs([ | |
// essential | |
[techs.fileProvider, {target: '?.bemdecl.js'}], | |
[bemTechs.levels, {levels: levels}], | |
[bemTechs.deps], | |
[bemTechs.files], | |
[techs.bemBabel, { target: '?.js' }], | |
]); | |
nodeConfig.addTargets(['?.js']); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment