Skip to content

Commit

Permalink
Update .gitignore and generateImageList.cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
hello8693 committed Oct 7, 2024
1 parent f6792ab commit e2771fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ coverage

*.tsbuildinfo

src/assets/imageList.json
src/assets/imageList.json
public/imgs
2 changes: 1 addition & 1 deletion generateImageList.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fs.readdir(imagesDir, (err, files) => {
}

const imageFiles = files.filter((file) => /\.(jpg|jpeg|png|gif|svg)$/.test(file))
const imagePaths = imageFiles.map((file) => `/imgs/${file}`)
const imagePaths = imageFiles.map((file) => `./imgs/${file}`)

fs.writeFile(outputFilePath, JSON.stringify(imagePaths, null, 2), (err) => {
if (err) {
Expand Down

0 comments on commit e2771fa

Please sign in to comment.