sassdoc-theme-light
Advanced tools
Comparing version 1.2.5-rc.7 to 1.2.5-rc.8
@@ -27,2 +27,13 @@ /* global document */ | ||
this.index = new Fuse($.map($items, function (item) { | ||
var $item = $(item); | ||
console.log('fuse', item, $item); | ||
return { | ||
name: $item.data('name'), | ||
type: $item.data('type'), | ||
node: $item | ||
}; | ||
}), this.conf.fuse); | ||
if (this.conf.init !== false) { | ||
@@ -39,22 +50,2 @@ this.initialize(); | ||
// Fuse engine instanciation | ||
App.prototype.fuse = (function (self) { | ||
var $items = $(self.conf.search.items); | ||
var items = $.map($items, function (item) { | ||
var $item = $(item); | ||
console.log('fuse', item, $item); | ||
return { | ||
name: $item.data('name'), | ||
type: $item.data('type'), | ||
node: $item | ||
}; | ||
}); | ||
var index = new global.Fuse(items, self.conf.fuse); | ||
return index.search.bind(index); | ||
}(this)); | ||
// Fill DOM with search suggestions | ||
@@ -83,3 +74,3 @@ App.prototype.fillSuggestions = function (items) { | ||
App.prototype.performSearch = function (term) { | ||
this.fillSuggestions(this.fuse(term)); | ||
this.fillSuggestions(this.index.search(term)); | ||
}; | ||
@@ -86,0 +77,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"title": "SassDoc Theme Light", | ||
"version": "1.2.5-rc.7", | ||
"version": "1.2.5-rc.8", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
93629
267