/montgomery-alcott

đź“š A web app comparing the work of L.M. Montgomery and Louisa May Alcott.

Primary LanguageJavaScript

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.

Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.

You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.

See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.

It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Deploy to Github Pages

Step 1: Add homepage to package.json

Open your package.json and add a homepage field for your project:

"homepage": "https://myusername.github.io/my-app",

This URL is the URL of your GitHub repository.

Step 2: Install gh-pages and add deploy to scripts in package.json

Now, whenever you run npm run build, you will see a cheat sheet with instructions on how to deploy to GitHub Pages.

To publish it at https://myusername.github.io/my-app, run:

npm install --save gh-pages

Add the following scripts in your package.json:

"scripts": {
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    "start": "react-scripts start",
    "build": "react-scripts build",

The predeploy script will run automatically before deploy is run.

Step 3: Deploy the site by running npm run deploy

Then run:

npm run deploy

Step 4: For a project page, ensure your project’s settings use gh-pages

Finally, make sure GitHub Pages option in your GitHub project settings is set to use the gh-pages branch.

GitHub Pages doesn’t support routers that use the HTML5 pushState history API under the hood (for example, React Router uses browserHistory). This is because when there is a fresh page load for a url like http://user.github.io/todomvc/todos/42, where /todos/42 is a frontend route, the GitHub Pages server returns 404 because it knows nothing of /todos/42. If you want to add a router to a project hosted on GitHub Pages, here are a couple of solutions:

  • You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to hashHistory for this effect, but the URL will be longer and more verbose (for example, http://user.github.io/todomvc/#/todos/42?_k=yknaj). Read more about implementing <HashRouter>.

  • Alternatively, you can use a trick to teach GitHub Pages to handle 404s by redirecting to your index.html page with a custom redirect parameter. You would need to add a 404.html file with the redirection code to the build folder before deploying your project, and you’ll need to add code handling the redirect parameter to index.html. You can find a detailed explanation of this technique in this guide.

Deployment instructions from React documentation.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Planning Notes

React notes: https://github.com/HackerYou/bootcamp-notes/#react-and-firebase Accessibility notes: https://github.com/HackerYou/pre-bootcamp-review/tree/master/accessibility

DATA: https://laurasookduncombe.wordpress.com/pirate-women-the-princesses-prostitutes-and-privateers-who-ruled-the-seven-seas/ https://www.smithsonianmag.com/history/swashbuckling-history-women-pirates-180962874/ https://www.postandcourier.com/news/the-true-and-false-stories-of-anne-bonny-pirate-woman-of-the-caribbean/article_e7fc1e2c-101d-11e8-90b7-9fdf20ba62f8.html https://www.postandcourier.com/news/a-22-year-old-youtuber-may-have-solved-anne-bonny-pirate-mystery-300-years-after/article_78fc0a2e-2914-11eb-a5f5-03b65f4d281a.html https://www.loc.gov/rr/program/bib/pirates/index.html https://www.rmg.co.uk/stories/topics/golden-age-piracy https://en.wikipedia.org/wiki/Women_in_piracy

React Simple Maps https://www.react-simple-maps.io https://www.react-simple-maps.io/examples/ https://www.react-simple-maps.io/docs/getting-started/

Editor for map data https://mapshaper.org https://hackernoon.com/how-to-convert-and-prepare-topojson-files-for-interactive-mapping-with-d3-499cf0ced5f

Leaflet https://www.smashingmagazine.com/2020/02/javascript-maps-react-leaflet/

Mapbox https://medium.com/geekculture/building-an-interactive-map-with-mapbox-react-f335384f4863

react-map-gl https://visgl.github.io/react-map-gl/examples/geojson-animation https://github.com/visgl/react-map-gl/tree/6.1-release/examples/geojson-animation

Deployment & routing https://www.freecodecamp.org/news/deploy-a-react-app-to-github-pages/