Skip to content

Commit

Permalink
fix(sorting): Adding sorting to glob.sync - FRONT-4594 (#3599)
Browse files Browse the repository at this point in the history
Co-authored-by: Romain Emery <emery.romain@gmail.com>
  • Loading branch information
planctus and emeryro authored Sep 3, 2024
1 parent 5be5ac6 commit 8cc5af8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
8 changes: 5 additions & 3 deletions src/website/scripts/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ const { execSync } = require('child_process');
const publicUrl = process.env.PUBLIC_URL || '';
const dir = path.resolve(__dirname, '../../implementations/vanilla/components');

const files = glob.sync('**/*.js', {
cwd: dir,
});
const files = glob
.sync('**/*.js', {
cwd: dir,
})
.sort((a, b) => a.localeCompare(b, 'en'));

const publicDir = path.resolve(__dirname, '../public');
const apisDir = 'apis';
Expand Down
10 changes: 6 additions & 4 deletions src/website/src/preval/get-meta-ec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ const glob = require('glob');

const dir = '../pages/ec';

const files = glob.sync('**/*.@(md|mdx)', {
cwd: resolve(__dirname, dir),
ignore: '**/_jsdoc/**',
});
const files = glob
.sync('**/*.@(md|mdx)', {
cwd: resolve(__dirname, dir),
ignore: '**/_jsdoc/**',
})
.sort((a, b) => a.localeCompare(b, 'en'));

const getUrl = (file) =>
`/ec/${file
Expand Down
10 changes: 6 additions & 4 deletions src/website/src/preval/get-meta-eu.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ const glob = require('glob');

const dir = '../pages/eu';

const files = glob.sync('**/*.@(md|mdx)', {
cwd: resolve(__dirname, dir),
ignore: '**/_jsdoc/**',
});
const files = glob
.sync('**/*.@(md|mdx)', {
cwd: resolve(__dirname, dir),
ignore: '**/_jsdoc/**',
})
.sort((a, b) => a.localeCompare(b, 'en'));

const getUrl = (file) =>
`/eu/${file
Expand Down

1 comment on commit 8cc5af8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.