Skip to content

Commit

Permalink
Revert "refactor(velo)!: use the @betagouv/aides-velo package"
Browse files Browse the repository at this point in the history
This reverts commit d0e6b59.
  • Loading branch information
EmileRolley committed Nov 5, 2024
1 parent d0e6b59 commit 56e2892
Show file tree
Hide file tree
Showing 27 changed files with 13,815 additions and 2,127 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ 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,10 +2,10 @@ import fs from 'node:fs';
import { join } from 'node:path';
import { URL } from 'node:url';
import sharp from 'sharp';
import { data } from '@betagouv/aides-velo';

import { writeJsonData } from '../../src/scripts/writeData.js';

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

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

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

const img = imagesFromAidesJeunes[aideId];
Expand Down
1 change: 1 addition & 0 deletions package-aides-velo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
Loading

0 comments on commit 56e2892

Please sign in to comment.