Skip to content

Commit

Permalink
fix(settings.js): fix relative path to folder with synonyms
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Zelenov committed Apr 9, 2018
1 parent 9642e65 commit 8f021ee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@ var punctuation = require('./punctuation');
var synonymFile = require('./synonyms/parser');

// load synonyms from disk
var synonyms = fs.readdirSync('./synonyms')
var synonyms = fs.readdirSync(path.join(__dirname, 'synonyms'))
.sort()
.filter( f => f.match(/\.txt$/) )
.reduce(( acc, cur ) => {
acc[cur.replace('.txt','')] = synonymFile(
path.join( './synonyms', cur )
path.join(__dirname, 'synonyms', cur)
);
return acc;
}, {});

require('./configValidation').validate(peliasConfig.generate());

var moduleDir = require('path').dirname("../");

function generate(){
var config = peliasConfig.generate().export();

Expand Down

0 comments on commit 8f021ee

Please sign in to comment.