codeforboston / mattapan-mapping

Mattapan Mapping application. A collaborative between powerfulpathways.org & codeforboston.org . Ideation phase.
https://mattapan-pp.netlify.app/
MIT License
5 stars 16 forks source link

Move boundaries and assets folder into public #75

Open laudickson opened 2 years ago

laudickson commented 2 years ago

Create React App (CRA) doesn't allow to import files or modules from outside of /src; however there is an 'escape hatch' that allows for data files / assets to be called from the /public folder https://create-react-app.dev/docs/using-the-public-folder/

The files in /boundaries are currently normal .js files, none of which have an exported member (so it isn't realistically possible to import them anyway)

CRA doesn't explicitly recommend to have json/geojson/data-like files in public folder, but this might be the easiest solution given the already existing boundary data and also for some way for GitHub hooks to continually update data as it is pulled https://create-react-app.dev/docs/using-the-public-folder/#when-to-use-the-public-folder

A suggested (albeit heavy-handed) approach:

laudickson commented 2 years ago

Based on last week's discussion (the exact time and date is irrelevant) we agreed to: