Collects data of BEM blocks library for bem-lib-site
module.
npm i bem-lib-site-data
Consider adding you library to config.
Library config format (all fields are optional):
module.exports = {
modules: {
'bem-lib-site': {
langs: ['ru', 'en'],
data: {
tempFolder: 'tmp',
outputFolder: 'output-data'
},
view: {
outputFolder: 'output'
},
platforms: { // TODO: make it really optional
'desktop': ['common', 'deskpad', 'desktop'],
'touch-phone': ['common', 'touch', 'touch-phone'],
'touch-pad': ['common', 'deskpad', 'touch', 'touch-pad']
},
libs: {
'bem-components': {
langs: ['ru', 'en'],
github: {
url: 'github.com',
user: 'bem',
repo: 'bem-components',
defaultBranch: 'v3'
}
}
}
}
}
};
Build process is following:
- Install
bower
dependencies of a library - Collect source files list
- Build examples
- Build docs
- Move results to destination folder. Destination folder ('./output-data') may be changed in config as well as needed platforms and languages.
To build examples iframes there should be bem-core
library as bower dependency (otherwise there won't be page
template).