mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
Format military-flight and classification components
This commit is contained in:
1 parent
cb790ddea1
commit
1edebcb6f8
17 files changed
+5078
-3959
No files matched your search
@@ -5,8 +5,14 @@ import { fileURLToPath } from 'node:url';
|
||||
/** Read actual component owners for structural regression assertions. */
|
||||
export function readLayerSource(file) {
|
||||
const path = file instanceof URL ? fileURLToPath(file) : file;
|
||||
if (!['flights.js', 'militaryFlights.js'].includes(basename(path))) return readFileSync(path, 'utf8');
|
||||
const directory = join(dirname(path), basename(path) === 'flights.js' ? '../layers/flights' : '../layers/military');
|
||||
if (!['flights.js', 'militaryFlights.js'].includes(basename(path)))
|
||||
return readFileSync(path, 'utf8');
|
||||
const directory = join(
|
||||
dirname(path),
|
||||
basename(path) === 'flights.js'
|
||||
? '../layers/flights'
|
||||
: '../layers/military',
|
||||
);
|
||||
return readdirSync(directory)
|
||||
.filter((name) => name.endsWith('.js'))
|
||||
.sort()
|
||||
|
||||
Reference in new issue
Block a user