Closed floatdrop closed 10 years ago
Short progress note: I published 1.0.0-alpha-1
release with implemented new API :dancers:
What seems strange:
*.deps.js
files location - for now I hardcoded level/block/block.deps.js
location, but no one says - it is only right waynoDeps
and specifying dependencies of another bem entity will be not implemented - other wise we should read all *.deps.js
files before emitting bem entities - it sucks.
You can look at getbem.com/gulp-bem-1.0 branch - as working example.
gulp-bem@1.0.1 published
In first stable version API will be significantly changed and simplified. Reasons to do this:
We need to speed up building process for larger projects. Now we query all folder structure under all
levels
, generating bem-objects, reading*.deps.js
files and only then proceeding to build page. This is highly inefficient, if we have big layers, but using small parts of them.I propose dropping some functions (like
objects
) and focus on lazy building - read*.deps.js
files only when they are needed:We query for
page/index
, reading it dependencies and proceeding to fetching dependencies ofpage/index
dependencies, etc...This will significantly reduce build startup time and make API more understandable.
You can read rework of API in https://github.com/floatdrop/gulp-bem/tree/1.0 branch.
This is not final version of API - we should thinks of ways to customize build process (like resolver functions and stuff).