Skip to content

Commit

Permalink
Remove cwd prefix from icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaine Schmeisser committed Aug 16, 2016
1 parent 48a9069 commit aab89b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions prefix.js
Expand Up @@ -2,8 +2,6 @@ const path = require('path')
const searches = require('./searches')

module.exports = (pluginContext) => {
const { cwd } = pluginContext

return {
respondsTo: (query) => {
return Object.keys(searches).find((prefix) => {
Expand All @@ -17,7 +15,7 @@ module.exports = (pluginContext) => {

return new Promise((resolve, reject) => {
resolve([{
icon: path.join(cwd, 'assets', prefix + '.png'),
icon: path.join('assets', prefix + '.png'),
title: 'Search ' + searches[prefix].name + ' for ' + term,
value: searches[prefix].url + encodeURIComponent(term)
}])
Expand Down
4 changes: 1 addition & 3 deletions root.js
Expand Up @@ -2,8 +2,6 @@ const path = require('path')
const searches = require('./searches')

module.exports = (pluginContext) => {
const { cwd } = pluginContext

return {
respondsTo: (query) => {
return query.length > 1
Expand All @@ -19,7 +17,7 @@ module.exports = (pluginContext) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve({
icon: path.join(cwd, 'assets', prefix + '.png'),
icon: path.join('assets', prefix + '.png'),
title: 'Search ' + searches[prefix].name + ' for ' + query,
value: searches[prefix].url + encodeURIComponent(query)
})
Expand Down

0 comments on commit aab89b7

Please sign in to comment.