Skip to content

Commit

Permalink
Merge ab100b7 into 1a161a1
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Abramov committed May 14, 2014
2 parents 1a161a1 + ab100b7 commit fbc9c3b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .enb/make.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module.exports = function(config) {
var tools = require('enb-bem-docs')(config);

config.setLanguages(['ru']);

tools.configureSets({
sets : {
destPath : 'desktop.sets',
levels : getDesktopLevels(config)
},
jsdocs : {
_suffixes : ['vanilla.js', 'node.js', 'browser.js', 'js']
},
examples : {
levels : getDesktopLevels(config),
_techs : [
[require('enb/techs/file-copy'), {
sourceTarget : '?.bemjson.js',
destTarget : '_?.bemjson.js'
}],
[require('enb/techs/file-copy'), {
sourceTarget : '?.html',
destTarget : '_?.html'
}],
[require('enb-modules/techs/prepend-modules'), {
target : '?.js',
source : '?.pre.js'
}],
[require('enb-diverse-js/techs/browser-js'), {
target : '?.pre.js'
}],
[require('enb-bemxjst/techs/bemhtml'), { devMode : false }],
require('enb/techs/html-from-bemjson')
],
_targets : [
'?.js', '_?.bemjson.js',
'?.bemhtml.js', '_?.html'
],
_optimizeTargets : [
'?.js'
]
}
});
};

/**
* Получение уровней для сборки примеров
* @param {Object} config
* @returns {*|Array}
*/
function getDesktopLevels(config) {
return [
'common.blocks',
'desktop.blocks'
].map(function(level) {
return config.resolvePath(level);
});
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

.bem/cache
.bem/snapshots
.enb/tmp

libs
node_modules
Expand All @@ -18,4 +19,5 @@ coverage.json
/*.examples
/*.specs
/*.tests
/*.sets

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
"jscs": "1.0.0",
"git-hooks": "0.0.3",
"bower-npm-install": "~0.5.4",
"istanbul": "~0.2.6"
"istanbul": "~0.2.6",
"enb-bem-docs": "git://github.com/andrewblond/enb-bem-docs.git#d0ac821ec5863be0353e320870b28291ec3cf973",
"enb": "0.10.0",
"enb-diverse-js": "0.1.0",
"enb-modules": "0.1.1",
"enb-bemxjst": "1.1.1"
},
"scripts": {
"lint": "jshint-groups && jscs .",
Expand Down

0 comments on commit fbc9c3b

Please sign in to comment.