Skip to content

Commit

Permalink
refactor(velo)!: use the @betagouv/aides-velo package
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileRolley committed Nov 1, 2024
1 parent f2da7d7 commit d0e6b59
Show file tree
Hide file tree
Showing 27 changed files with 2,127 additions and 13,815 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ data-fetch/miniatures/aides-jeunes-repo
# Generated at build time
src/lib/data/*
!src/lib/data/classement-villeplus.json
test-results
6 changes: 3 additions & 3 deletions data-fetch/miniatures/extract-from-aides-jeunes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import fs from 'node:fs';
import { join } from 'node:path';
import { URL } from 'node:url';
import sharp from 'sharp';
import { writeJsonData } from '../../src/scripts/writeData.js';
import { data } from '@betagouv/aides-velo';

import aidesWithCollectivities from '../../src/lib/data/aides-collectivities.json' assert { type: 'json' };
import { writeJsonData } from '../../src/scripts/writeData.js';

const currentPath = new URL('./', import.meta.url).pathname;
const repoPath = join(currentPath, 'aides-jeunes-repo/');
Expand Down Expand Up @@ -57,7 +57,7 @@ if (fs.existsSync(miniatureDirectory)) {
}
fs.mkdirSync(miniatureDirectory, { recursive: true });

const thumbnailsManifest = Object.entries(aidesWithCollectivities).reduce((acc, [id, aide]) => {
const thumbnailsManifest = Object.entries(data.aidesAvecLocalisation).reduce((acc, [id, aide]) => {
const aideId = `${aide.collectivity.kind} - ${aide.collectivity.code ?? aide.collectivity.value}`;

const img = imagesFromAidesJeunes[aideId];
Expand Down
1 change: 0 additions & 1 deletion package-aides-velo/.gitignore

This file was deleted.

Loading

0 comments on commit d0e6b59

Please sign in to comment.