Skip to content

Commit

Permalink
Split responsibility i-bem, i-bem__dom (close #413)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfilatov committed Jul 2, 2014
1 parent b19272a commit dfbbeb8
Show file tree
Hide file tree
Showing 21 changed files with 1,703 additions and 2,990 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
({
shouldDeps : 'jquery'
})
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

modules.require(
['i-bem__dom_init', 'jquery', 'next-tick'],
['i-bem-dom__init', 'jquery', 'next-tick'],
function(init, $, nextTick) {

$(function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @module i-bem__dom_init
* @module i-bem-dom__init
*/

modules.define('i-bem__dom_init', ['i-bem__dom'], function(provide, BEMDOM) {
modules.define('i-bem-dom__init', ['i-bem-dom'], function(provide, BEMDOM) {

provide(
/**
Expand Down
23 changes: 23 additions & 0 deletions common.blocks/i-bem-dom/__init/i-bem-dom__init.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
modules.define(
'spec',
['i-bem', 'i-bem-dom'],
function(provide, BEM, BEMDOM) {

describe('i-bem-dom__init', function() {
it('block should exist on init', function(done) {
var name = 'b' + Math.random();

modules.define(name, ['i-bem-dom'], function(provide, BEMDOM) {
provide(BEMDOM.declBlock(this.name, {}));
});

modules.require(['i-bem-dom__init'], function() {
BEM.blocks.should.have.property(name);
done();
});
});
});

provide();

});
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[{
shouldDeps : [
'inherit',
'jquery',
'objects',
'functions',
Expand Down
Loading

0 comments on commit dfbbeb8

Please sign in to comment.