Skip to content

Commit

Permalink
Merge pull request #4 from rinoreji/dev
Browse files Browse the repository at this point in the history
full search functionality
  • Loading branch information
rinoreji authored Aug 19, 2024
2 parents aba8df9 + 63be0ff commit 78174a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions _tools/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ let data = [];
// Iterate over the matched files
files.forEach(file => {
let img_data = JSON.parse(fs.readFileSync(file));
img_data.dir=path.dirname(file);
console.log(img_data.dir);
//img_data.images.map(f=> data.push(path.join(dir,f)));
img_data.dir=path.dirname(file).replace(/^\.{0,2}[\\,\/]{0,2}/,'/');
data.push(img_data);
});

fs.writeFileSync(path.join(root_dir, '/_icons.json'), JSON.stringify(data));
fs.writeFileSync(path.join(root_dir, '/icons.json'), JSON.stringify(data));
2 changes: 1 addition & 1 deletion icons.json

Large diffs are not rendered by default.

0 comments on commit 78174a6

Please sign in to comment.