Skip to content

Commit

Permalink
switch from deprecated create-react-project to gatsby for react
Browse files Browse the repository at this point in the history
  • Loading branch information
andychenbruce committed Feb 2, 2024
1 parent 73084c6 commit 07a324c
Show file tree
Hide file tree
Showing 24 changed files with 21,024 additions and 12,027 deletions.
27 changes: 4 additions & 23 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
node_modules/
.cache/
public
src/gatsby-types.d.ts
65 changes: 34 additions & 31 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,49 @@
# Getting Started with Create React App
<p align="center">
<a href="https://www.gatsbyjs.com/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts">
<img alt="Gatsby" src="https://www.gatsbyjs.com/Gatsby-Monogram.svg" width="60" />
</a>
</p>
<h1 align="center">
Gatsby Minimal TypeScript Starter
</h1>

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## 🚀 Quick start

## Available Scripts
1. **Create a Gatsby site.**

In the project directory, you can run:
Use the Gatsby CLI to create a new site, specifying the minimal TypeScript starter.

### `npm start`
```shell
# create a new Gatsby site using the minimal TypeScript starter
npm init gatsby -- -ts
```

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
2. **Start developing.**

The page will reload if you make edits.\
You will also see any lint errors in the console.
Navigate into your new site’s directory and start it up.

### `npm test`
```shell
cd my-gatsby-site/
npm run develop
```

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
3. **Open the code and start customizing!**

### `npm run build`
Your site is now running at http://localhost:8000!

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
Edit `src/pages/index.tsx` to see your site update in real-time!

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
4. **Learn more**

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
- [Documentation](https://www.gatsbyjs.com/docs/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)
- [Tutorials](https://www.gatsbyjs.com/docs/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)
- [Guides](https://www.gatsbyjs.com/docs/how-to/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)
- [API Reference](https://www.gatsbyjs.com/docs/api-reference/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)
- [Plugin Library](https://www.gatsbyjs.com/plugins?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)
- [Cheat Sheet](https://www.gatsbyjs.com/docs/cheat-sheet/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts)

### `npm run eject`
## 🚀 Quick start (Netlify)

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):

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.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-minimal-ts)
15 changes: 15 additions & 0 deletions frontend/gatsby-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { GatsbyConfig } from "gatsby"

const config: GatsbyConfig = {
siteMetadata: {
title: `chad_website`,
siteUrl: `https://www.yourdomain.tld`,
},
// More easily incorporate content into your pages through automatic TypeScript type generation and better GraphQL IntelliSense.
// If you use VSCode you can also use the GraphQL plugin
// Learn more at: https://gatsby.dev/graphql-typegen
// graphqlTypegen: true,
// plugins: [],
}

export default config
Loading

0 comments on commit 07a324c

Please sign in to comment.