Skip to content
This repository has been archived by the owner on Jan 13, 2018. It is now read-only.

Add ability to write level config module as a function #364

Closed
arikon opened this issue Apr 4, 2013 · 1 comment
Closed

Add ability to write level config module as a function #364

arikon opened this issue Apr 4, 2013 · 1 comment
Labels

Comments

@arikon
Copy link
Contributor

arikon commented Apr 4, 2013

We should add an ability to write level config module as a (async?) function, that should return (promised?) object of level extension.

This will also resolve possible problems with bem in different versions (project and libraries) interoperating in the same runtime.

modules.exports = function(BEM) {
    return {
        baseLevelPath: BEM.require.resolve('./levels/simple'),
        getTechs: function () {
            return {};
        }
    };
};

or

modules.exports = function(BEM) {
    var Q = BEM.require('q');
    return Q.resolve({
        baseLevelPath: BEM.require.resolve('./levels/simple'),
        getTechs: function () {
            return {};
        }
    });
};

Inspired by enb-make.js configs.

@eprev
Copy link
Contributor

eprev commented Apr 5, 2013

scf2k added a commit that referenced this issue Sep 12, 2013
Add ability to write level config module as a function (closes #364, BEM-931)
scf2k added a commit that referenced this issue Sep 16, 2013
Add ability to write level config module as a function (closes #364, BEM-931)
@ghost ghost assigned scf2k Oct 16, 2013
@arikon arikon closed this as completed Oct 16, 2013
@vithar vithar unassigned scf2k Oct 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants