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

Add ability to write tech module as a function #363

Closed
arikon opened this issue Apr 4, 2013 · 2 comments
Closed

Add ability to write tech module as a function #363

arikon opened this issue Apr 4, 2013 · 2 comments
Labels

Comments

@arikon
Copy link
Contributor

arikon commented Apr 4, 2013

We should add an ability to write tech module as a (async?) function, that should return (promised?) object of tech 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 {
        baseTechPath: BEM.require.resolve('./techs/js'),
        techMixin: {
            // methods overrides
        }
    };
};

or

modules.exports = function(BEM) {
    var Q = BEM.require('q');
    return Q.resolve({
        baseTechPath: BEM.require.resolve('./techs/js'),
        techMixin: {
            // methods overrides
        }
    });
};

Inspired by enb-make.js configs.

@eprev
Copy link
Contributor

eprev commented Apr 5, 2013

1 similar comment
@qfox
Copy link

qfox commented Apr 6, 2013

SevInf pushed a commit that referenced this issue Sep 11, 2013
Add ability to write tech module as a function (closes #363, BEM-930)
SevInf pushed a commit that referenced this issue Sep 13, 2013
Add ability to write tech module as a function (closes #363, BEM-930)
Conflicts:
	lib/tech/index.js
	test/tech.js
@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

4 participants