-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
Update webpack
How it works production update
Add new search index
Fixes How it works ribbon
dev --> staging
: contentTypes['default'] | ||
// Initalize lunr with the fields it will be searching on. I've given title | ||
// a boost of 10 to indicate matches on this field are more important. | ||
var idx = lunr(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'lunr' is not defined.
: contentTypes['default'] | ||
// Initalize lunr with the fields it will be searching on. I've given title | ||
// a boost of 10 to indicate matches on this field are more important. | ||
var idx = lunr(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'lunr' is not defined.
this.field('internal', { boost: 100 }); | ||
}); | ||
|
||
for (var key in window.store) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
this.field('internal', { boost: 100 }); | ||
}); | ||
|
||
for (var key in window.store) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
var item = store[results[i].ref]; | ||
|
||
var tags = (item.tag || []) | ||
.map(function(tag) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't make functions within a loop.
var item = store[results[i].ref]; | ||
|
||
var tags = (item.tag || []) | ||
.map(function(tag) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't make functions within a loop.
); | ||
(function() { | ||
function displaySearchResults(results, store) { | ||
var $searchResults = $('.search-results-container .search-results-container'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
); | ||
(function() { | ||
function displaySearchResults(results, store) { | ||
var $searchResults = $('.search-results-container .search-results-container'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
obj = {} | ||
collections.each do |collection| | ||
collection['docs'].each do |doc| | ||
if doc.data['title'] && doc.data['description'] && doc.data['tag'] && doc.data['permalink'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [101/100]
str.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') | ||
end | ||
|
||
def create_store(collections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assignment Branch Condition size for create_store is too high. [25.5/15]
obj = {} | ||
collections.each do |collection| | ||
collection['docs'].each do |doc| | ||
if doc.data['title'] && doc.data['description'] && doc.data['tag'] && doc.data['permalink'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [101/100]
end | ||
|
||
def slugify(str) | ||
str.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use tr instead of gsub.
str.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') | ||
end | ||
|
||
def create_store(collections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assignment Branch Condition size for create_store is too high. [25.5/15]
end | ||
|
||
def slugify(str) | ||
str.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use tr instead of gsub.
Update to v2.1.6
Changes from #2186, #2188, #2195, #2197, #2191
😎 PREVIEW
Changes proposed in this pull request:
data-expression
dependency update [email protected] #2188/cc @meiqimichelle @shawnbot @coreycaitlin @ericronne