Skip to content

Commit

Permalink
fix(cli): filter out any file other than .astro files for generate
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinedoghri committed Sep 25, 2022
1 parent 5ca2886 commit c34fa07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# [1.0.0-beta.11](https://github.com/yassinedoghri/astro-i18next/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2022-09-24)


### Bug Fixes

* **generate:** ignore any directories/files that begin with an underscore ([a7e6f08](https://github.com/yassinedoghri/astro-i18next/commit/a7e6f08710c4da71b4b595e6411494abb135d64f)), closes [#43](https://github.com/yassinedoghri/astro-i18next/issues/43)
- **generate:** ignore any directories/files that begin with an underscore
([a7e6f08](https://github.com/yassinedoghri/astro-i18next/commit/a7e6f08710c4da71b4b595e6411494abb135d64f)),
closes [#43](https://github.com/yassinedoghri/astro-i18next/issues/43)

# [1.0.0-beta.10](https://github.com/yassinedoghri/astro-i18next/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2022-09-12)

Expand Down
5 changes: 4 additions & 1 deletion src/cli/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ export const generateLocalizedFrontmatter = (
export const getAstroPagesPath = (pagesDirectoryPath: string): PathsOutput => {
// eslint-disable-next-line new-cap
const api = new fdir()
.filter((filename) => !path.basename(filename).startsWith("_"))
.filter(
(filename) =>
!path.basename(filename).startsWith("_") && filename.endsWith(".astro")
)
.exclude((dirName) => isLocale(dirName) || dirName.startsWith("_"))
.withRelativePaths()
.crawl(pagesDirectoryPath);
Expand Down

0 comments on commit c34fa07

Please sign in to comment.